Colin Ian King
85dd1dd6e2
drm/vkms: Fix missing kmalloc allocation failure check
...
Currently the kmalloc allocation for config is not being null
checked and could potentially lead to a null pointer dereference.
Fix this by adding the missing null check.
Addresses-Coverity: ("Dereference null return value")
Fixes: 2df7af93fd ("drm/vkms: Add vkms_config type")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Reviewed-by: Sumera Priyadarsini <sylphrenadin@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210115130911.71073-1-colin.king@canonical.com
2021-01-15 17:45:07 -03:00
Nirmoy Das
0d7ab83546
drm/amdgpu: Remove unused variable
...
Remove unused space_needed variable.
Fixes: 453f617a30 ("drm/amdgpu: Resize BAR0 to the maximum available size, even if it doesn't cover VRAM")
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/413807/
2021-01-15 13:00:57 +01:00
Thomas Zimmermann
1355a484ef
drm/vc4: Initialize vc4_drm_driver with CMA helper defaults
...
The function vc4_prime_import_sg_table() is an otherwise empty wrapper
around CMA's drm_gem_cma_prime_import_sg_table(). Removing it in favor
of the latter allows to initialize vc4_drm_driver with CMA's initializer
macro.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210114084949.29014-1-tzimmermann@suse.de
2021-01-15 10:39:05 +01:00
Thomas Zimmermann
28645ae064
drm/hisilicon/hibmc: Remove hibmc_ttm.c
...
The file is not in use. It got re-added by a rebased patch. Removing
it.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Fixes: 4d4dad21cc ("drm/hibmc: Remove references to struct drm_device.pdev")
Reviewed-by: Tian Tao <tiantao6@hisilicon.com >
Reported-by: Tian Tao <tiantao6@hisilicon.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Xinliang Liu <xinliang.liu@linaro.org >
Cc: Tian Tao <tiantao6@hisilicon.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com >
Cc: Chen Feng <puck.chen@hisilicon.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Gong junjie <gongjunjie2@huawei.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210113113107.12005-1-tzimmermann@suse.de
2021-01-15 10:06:00 +01:00
Ville Syrjälä
5b34ab5240
drm/modes: Switch to 64bit maths to avoid integer overflow
...
The new >8k CEA modes have dotclocks reaching 5.94 GHz, which
means our clock*1000 will now overflow the 32bit unsigned
integer. Switch to 64bit maths to avoid it.
Cc: stable@vger.kernel.org
Reported-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201022194256.30978-1-ville.syrjala@linux.intel.com
Tested-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
2021-01-14 19:37:53 +02:00
Zack Rusin
625f8fb5bb
drm/vmwgfx: Fix display register usage for some older configs
...
We can't be setting the display_id register to an invalid value
because that makes our device reset the fb which causes nasty
flicker (due to destruction and creation of a new fb).
Also we can't be using the BITS_PER_PIXEL register if the
8BIT_EMULATION is not supported.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414041/?series=85516&rev=2
2021-01-14 12:16:47 -05:00
Zack Rusin
8426ed9c4b
drm/vmwgfx: Cleanup the cmd/fifo split
...
Lets try to cleanup the usage of the term FIFO which we used for
both our MMIO based cmd queue processing and for general
command processing which could have been using command buffers
interface. We're going to rename the functions which are processing
commands (and work either via MMIO or command buffers) as _cmd_
and functions which operate on the MMIO based commands as FIFO
to match the SVGA device naming.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414044/?series=85516&rev=2
2021-01-14 12:15:49 -05:00
Zack Rusin
359dc60d0f
drm/vmwgfx: Remove the throttling code
...
Throttling was used before fencing to implement early vsync
support in the xorg state tracker a long time ago. The xorg
state tracker has been removed years ago and no one else
has ever used throttling. It's time to remove this code,
it hasn't been used or tested in years.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414042/?series=85516&rev=2
2021-01-14 12:14:10 -05:00
Zack Rusin
8772c0bb58
drm/vmwgfx: Cleanup pci resource allocation
...
Instead of doing it in multiple spots lets centralize the code
to handle pci resources. This also cleans up the error
handling a bit and will make it a lot easier to add additional
svga versions to the driver.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414040/?series=85516&rev=2
2021-01-14 12:13:49 -05:00
Zack Rusin
be4f77ac68
drm/vmwgfx: Cleanup fifo mmio handling
...
Going forward the svga device might reuse mmio for general
register accesses, in order to prepare for that we need to
cleanup our naming and handling of fifo specific mmio reads
and writes. As part of this work lets switch to managed
mapping of the fifo mmio to make the error handling cleaner.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414045/?series=85516&rev=2
2021-01-14 12:13:19 -05:00
Zack Rusin
9703bb3292
drm/vmwgfx: Switch to a managed drm device
...
To cleanup some of the error handling and prepare for some
other work lets switch to a managed drm device. It will
let us get a better handle on some of the error paths.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414039/?series=85516&rev=2
2021-01-14 12:12:48 -05:00
Zack Rusin
31856c8c1c
drm/vmwgfx: Remove stealth mode
...
Before drm got helpers for removing conflicting pci framebuffer devices
we implemented something known as "stealth" mode which allowed vmwgfx
to run even if it couldn't reserve pci resources. We can just switch
to regular drm helpers instead of keeping the stealth mode alive as
it makes our code a lot cleaner.
Signed-off-by: Zack Rusin <zackr@vmware.com >
Reviewed-by: Martin Krastev <krastevm@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414043/?series=85516&rev=2
2021-01-14 12:12:10 -05:00
Roland Scheidegger
93dd856192
drm/vmwgfx: add Zack Rusin as maintainer
...
Reviewed-by: Zack Rusin <zackr@vmware.com >
Signed-off-by: Roland Scheidegger <sroland@vmware.com >
Signed-off-by: Zack Rusin <zackr@vmware.com >
Link: https://patchwork.freedesktop.org/patch/414043/?series=85516&rev=2
2021-01-14 12:10:33 -05:00
Sumera Priyadarsini
8323c62548
drm/vblank: Fix typo in docs
...
Fix typo in intro chapter in drm_vblank.c.
Change 'sacn' to 'scan'.
Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210114142245.udr7v2aa43ho56xs@adolin
2021-01-14 15:47:45 +01:00
Mauro Carvalho Chehab
7569c6051f
drm: drm_crc: fix a kernel-doc markup
...
A function has a different name between their prototype
and its kernel-doc markup:
../include/drm/drm_crtc.h:1257: warning: expecting prototype for drm_crtc_alloc_with_planes(). Prototype was for drmm_crtc_alloc_with_planes() instead
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org >
Acked-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Simon Ser <contact@emersion.fr >
Link: https://patchwork.freedesktop.org/patch/msgid/2439fb6713e9b2aa27a81f3269a4b0e8e7dfcd36.1610610937.git.mchehab+huawei@kernel.org
2021-01-14 15:11:46 +01:00
Giulio Benetti
67f4aeb2b4
drm/sun4i: tcon: fix inverted DCLK polarity
...
During commit 88bc417856 ("drm: Use new
DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags") DRM_BUS_FLAG_*
macros have been changed to avoid ambiguity but just because of this
ambiguity previous DRM_BUS_FLAG_PIXDATA_(POS/NEG)EDGE were used meaning
_SAMPLE_ not _DRIVE_. This leads to DLCK inversion and need to fix but
instead of swapping phase values, let's adopt an easier approach Maxime
suggested:
It turned out that bit 26 of SUN4I_TCON0_IO_POL_REG is dedicated to
invert DCLK polarity and this makes things really easier than before. So
let's handle DCLK polarity by adding SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGEDGE
as bit 26 and activating according to bus_flags the same way it is done
for all the other signals polarity.
Fixes: 88bc417856 ("drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags")
Suggested-by: Maxime Ripard <maxime@cerno.tech >
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20210114081732.9386-1-giulio.benetti@benettiengineering.com
2021-01-14 12:37:28 +01:00
Tian Tao
657b65058b
drm/hisilicon: Fix build error
...
Fix the following errors:
divers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:
In function ‘hibmc_hw_map’:
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:213:25:
error: ‘dev’ undeclared (first use in this function);
Fixes: 4d4dad21cc ("drm/hibmc: Remove references to struct drm_device.pdev")
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1610529568-25754-1-git-send-email-tiantao6@hisilicon.com
2021-01-14 04:40:19 -05:00
Thomas Zimmermann
6810458196
drm: Include <linux/mem_encrypt.h> in drm_cache.c
...
The function drm_need_swiotbl() needs mem_encrypt_active() from
<linux/mem_encrypt.h>. The include got lost when refactoring the
code recently.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Fixes: 3abc667063 ("drm: Implement drm_need_swiotlb() in drm_cache.c")
Reviewed-by: Christian König <christian.koenig@amd.com >
Reported-by: kernel test robot <lkp@intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Christian König <christian.koenig@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210114080535.17132-1-tzimmermann@suse.de
2021-01-14 09:42:31 +01:00
Lukasz Luba
42dceab050
drm/panfrost: Use delayed timer as default in devfreq profile
...
Devfreq framework supports 2 modes for monitoring devices.
Use delayed timer as default instead of deferrable timer
in order to monitor the GPU status regardless of CPU idle.
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Signed-off-by: Steven Price <steven.price@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210105164111.30122-1-lukasz.luba@arm.com
2021-01-13 15:38:27 +00:00
Thomas Zimmermann
14054f2afc
drm: Move struct drm_device.hose to legacy section
...
The field is only relevant for legacy DRM drivers. Its only non-legacy
user in the DRM core is in drm_file.c. This code is now protected by
CONFIG_DRM_LEGACY. Radeon, the only driver that used the field, has been
changed to maintain it's own copy.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-7-tzimmermann@suse.de
2021-01-13 14:22:37 +01:00
Thomas Zimmermann
5c1736cff1
drm/radeon: Store PCI controller in struct radeon_device.hose
...
Moves struct drm_device.hose into struct radeon_device. The field in
struct DRM device is only for legacy drivers.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-6-tzimmermann@suse.de
2021-01-13 14:22:37 +01:00
Thomas Zimmermann
02e415f879
drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY
...
CONFIG_DRM_VM gets selected by CONFIG_DRM_LEGACY, but nothing else. So
remove it and build drm_vm.o as part of CONFIG_DRM_LEGACY.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-5-tzimmermann@suse.de
2021-01-13 14:22:37 +01:00
Thomas Zimmermann
413c646634
drm: Build drm_memory.o only for legacy drivers
...
The file contains I/O-memory functions that are only used by legacy
drivers.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-4-tzimmermann@suse.de
2021-01-13 14:22:29 +01:00
Thomas Zimmermann
3abc667063
drm: Implement drm_need_swiotlb() in drm_cache.c
...
The function is declared in drm_cache.h. I also removed the curly
braces from the for loop to adhere to kernel coding style.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-3-tzimmermann@suse.de
2021-01-13 14:22:29 +01:00
Thomas Zimmermann
ff28a9f8d3
drm: Inline AGP wrappers into their only callers
...
The AGP wrapper functions serve no purpose. They used to handle
builds that have CONFIG_AGP unset. But their callers are all in
drm_agpsupport.c, which only gets build with CONFIG_AGP.
v2:
* clarify CONFIG_AGP in commit description (Daniel)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-2-tzimmermann@suse.de
2021-01-13 14:21:53 +01:00
Thomas Zimmermann
fa49fdbe78
drm/vc4: Move mmap implementation into GEM object function
...
Moving vc4's mmap code from vc4_mmap() into a GEM object function
allows for the use drm_gem_mmap() and drm_gem_prime_mmap(). The content
of vc4_drm_fpos can then be generated by DEFINE_DRM_GEM_FOPS().
The actual mmap implementation is just a check if the BO is a validated
shader plus the default CMA mmap code.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210108140808.25775-4-tzimmermann@suse.de
2021-01-13 12:52:33 +01:00
Thomas Zimmermann
ccfe8e9c12
drm/vc4: Make several BO functions static
...
Rearrange the code to make BO functions static. This will also help
with streamlining the BO's mmap implementation.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210108140808.25775-3-tzimmermann@suse.de
2021-01-13 12:52:26 +01:00
Thomas Zimmermann
b100ed1ee8
drm/vc4: Use drm_gem_cma_vmap() directly
...
Validated shaders cannot be exported. There's no need for testing this in
the BO's vmap implementation. Call drm_gem_cma_vmap() directly instead.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210108140808.25775-2-tzimmermann@suse.de
2021-01-13 12:52:08 +01:00
Jernej Skrabec
0cf1d70404
drm/sun4i: Add support for BT2020 to DE3
...
DE3 supports 10-bit formats, so it's only naturally to also support
BT2020 encoding.
Add support for it.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20210110201947.3611649-4-jernej.skrabec@siol.net
2021-01-13 10:33:57 +01:00
Jernej Skrabec
ea067aee45
drm/sun4i: de2/de3: Remove redundant CSC matrices
...
YUV to RGB matrices are almost identical to YVU to RGB matrices. They
only have second and third column reversed. Do that reversion in code in
order to lower amount of static data and redundancy.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20210110201947.3611649-3-jernej.skrabec@siol.net
2021-01-13 10:33:54 +01:00
Jernej Skrabec
99be71187b
drm/sun4i: csc: Rework DE3 CSC macros
...
Rework DE3 CSC macros to take just one coordinate instead of two. This
will make its usage easier in subsequent commit.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20210110201947.3611649-2-jernej.skrabec@siol.net
2021-01-13 10:33:50 +01:00
Sebastian Reichel
bb6dafdba6
video: omapfb2: Make standard and custom DSI command mode panel driver mutually exclusive
...
Standard DRM panel driver for DSI command mode panel used by omapfb2 is also
available now. Just like the other panels its module name clashes with the
module from drivers/video/fbdev/omap2/omapfb/displays, part of the deprecated
omapfb2 fbdev driver. As omapfb2 can only be compiled when the omapdrm driver
is disabled, and the DRM panel drivers are useless in that case, make the
omapfb2 panel depend on the standard DRM panels being disabled to fix
the name clash.
Fixes: cf64148abc ("drm/panel: Move OMAP's DSI command mode panel driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210108112441.14609-1-sebastian.reichel@collabora.com
2021-01-13 11:13:56 +02:00
Thomas Zimmermann
4c0d42f7ba
drm/nouveau: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert nouveau to struct
drm_device.dev. No functional changes.
v3:
* fix nv04_dfp_update_backlight() as well (Jeremy)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jeremy Cline <jcline@redhat.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210107080748.4768-8-tzimmermann@suse.de
2021-01-13 09:04:04 +01:00
Thomas Zimmermann
4d4dad21cc
drm/hibmc: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert hibmc to struct
drm_device.dev. No functional changes.
v3:
* rebased
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Tian Tao <tiantao6@hisilicon.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Xinliang Liu <xinliang.liu@linaro.org >
Cc: Tian Tao <tiantao6@hisilicon.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com >
Cc: Chen Feng <puck.chen@hisilicon.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210107080748.4768-4-tzimmermann@suse.de
2021-01-13 09:03:18 +01:00
Thomas Zimmermann
8f66090b7b
drm/amdgpu: Remove references to struct drm_device.pdev
...
Using struct drm_device.pdev is deprecated. Convert amdgpu to struct
drm_device.dev. No functional changes.
v3:
* rebased
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210107080748.4768-3-tzimmermann@suse.de
2021-01-13 09:02:58 +01:00
Thomas Zimmermann
8a11d28378
drm/amdgpu: Fix trailing whitespaces
...
Adhere to kernel coding style.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210107080748.4768-2-tzimmermann@suse.de
2021-01-13 09:02:50 +01:00
Sumera Priyadarsini
af20724c68
drm/vkms: Add information about module options
...
Update vkms documentation to contain usage of `modinfo`
command and steps to load vkms with module options enabled.
Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com >
Reviewed-by: Melissa Wen <melissa.srw@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4fbc6459377c1dcbe8e6648718453d5693f6451c.1610391685.git.sylphrenadin@gmail.com
2021-01-12 17:16:25 -03:00
Sumera Priyadarsini
1e85b7d427
drm/vkms: Add support for writeback module
...
Add enable_writeback feature to vkms_config as a module.
Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com >
Reviewed-by: Melissa Wen <melissa.srw@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/15802da4f1cdfed2b728c3d35731732f161dd073.1610391685.git.sylphrenadin@gmail.com
2021-01-12 17:16:25 -03:00
Sumera Priyadarsini
2df7af93fd
drm/vkms: Add vkms_config type
...
Currently, data for the device instance is held by vkms_device.
Add a separate type, vkms_config to contain configuration details
for the device and various modes to be later used by configfs.
This config data stays constant once the device is created.
Accordingly, add vkms_create and vkms_destroy to initialize/destroy
device through configfs. Currently, they are being called from vkms_init
and vkms_exit, but will be evoked from configfs later on. When configfs
is added, device configuration will be tracked by configfs and only vkms
device lifetime will be handled by vkms_init and vkms_exit functions.
Modify usage of enable_cursor feature to reflect the changes in
relevant files.
Co-developed-by: Daniel Vetter <danvet.vetter@ffwl.ch >
Signed-off-by: Daniel Vetter <danvet.vetter@ffwl.ch >
Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com >
Reviewed-by: Melissa Wen <melissa.srw@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/a090ad29b826185df30f80c66932dd2173d7b060.1610391685.git.sylphrenadin@gmail.com
2021-01-12 17:16:00 -03:00
Simon Ser
cc3283f8f4
drm/fourcc: fix Amlogic format modifier masks
...
The comment says the layout and options use 8 bits, and the shift
uses 8 bits. However the mask is 0xf, ie. 0b00001111 (4 bits).
This could be surprising when introducing new layouts or options
that take more than 4 bits, as this would silently drop the high
bits.
Make the masks consistent with the comment and the shift.
Found when writing a drm_info patch [1].
[1]: https://github.com/ascent12/drm_info/pull/67
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: d6528ec883 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression")
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Kevin Hilman <khilman@baylibre.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210110125103.15447-1-contact@emersion.fr
2021-01-12 15:52:43 +01:00
Xiaogang Chen
dc25e3776e
drm: distinguish return value of drm_dp_check_and_send_link_address
...
drm_dp_check_and_send_link_address discovers MST device topology. It can
return both positive and negative values. When it returns positive
values there is no error found. If it returns negative values there is
error found, such as get NAK , timeout, etc. Following
drm_kms_helper_hotplug_event should be called when
drm_dp_check_and_send_link_address returns positive value.
Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com >
Acked-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Simon Ser <contact@emersion.fr > (re-formatted commit message)
Link: https://patchwork.freedesktop.org/patch/msgid/DM6PR12MB2602B6281BF8C9430115E03BE3AA0@DM6PR12MB2602.namprd12.prod.outlook.com
2021-01-12 15:44:07 +01:00
Zhaoge Zhang
7e60bdeb91
drm: Fix macro name DRM_MODE_PROP_OBJECT in code comment
...
Signed-off-by: Zhaoge Zhang <zhangzhaoge@loongson.cn >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1610416479-32736-1-git-send-email-zhangzhaoge@loongson.cn
2021-01-12 09:56:48 +01:00
Zhaoge Zhang
2dee38d8cd
drm: Removes invalid function return value comment information
...
Signed-off-by: Zhaoge Zhang <zhangzhaoge@loongson.cn >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1610415567-32171-1-git-send-email-zhangzhaoge@loongson.cn
2021-01-12 09:56:47 +01:00
Linus Walleij
1316b6e460
dt-bindings: display: Augment s6e63m0 bindings
...
This fixes the following problems with the s6e63m0 display
bindings:
- When used on the DSI bus, the panel is listed directly as
a subnode on the DSI host so the "port" node is not
compulsory. Remove "port" from required properties.
- The panel contains its own backlight control, so reference
the backlight common properties and list default-brightness
and max-brightness as supported but optional properties.
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210101114522.1981838-1-linus.walleij@linaro.org
2021-01-12 09:08:55 +01:00
Tian Tao
9254cd1d29
drm/hisilicon: Use drm_crtc_mask()
...
Use drm_crtc_mask() where appropriate.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1610335818-32895-1-git-send-email-tiantao6@hisilicon.com
2021-01-11 19:53:05 -05:00
Rob Herring
b675542323
dt-bindings: display: Use OF graph schema
...
Now that we have a graph schema, rework the display related schemas to use
it. Mostly this is adding a reference to graph.yaml and dropping duplicate
parts from schemas.
In panel-common.yaml, 'ports' is dropped. Any binding using 'ports'
should be one with more than 1 port node, and the binding must define
what each port is.
Note that ti,sn65dsi86.yaml, ti,tfp410,yaml and toshiba,tc358768.yaml will
need further updates to use video-interfaces.yaml once that lands.
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Rob Herring <robh@kernel.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210104180724.2275098-1-robh@kernel.org
2021-01-11 18:03:59 -06:00
Nirmoy Das
453f617a30
drm/amdgpu: Resize BAR0 to the maximum available size, even if it doesn't cover VRAM
...
This allows BAR0 resizing to be done for cards which don't advertise
support for a size large enough to cover the VRAM but which do
advertise at least one size larger than the default. For example,
my RX 5600 XT, which advertises 256MB, 512MB and 1GB.
Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk >
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Nirmoy Das <nirmoy.das@amd.com >
Link: https://patchwork.kernel.org/project/dri-devel/patch/20210107175017.15893-4-nirmoy.das@amd.com
2021-01-14 21:20:53 +01:00
Nirmoy Das
907830b0fc
PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse
...
RX 5600 XT Pulse advertises support for BAR 0 being 256MB, 512MB,
or 1GB, but it also supports 2GB, 4GB, and 8GB. Add a rebar
size quirk so that the BAR 0 is big enough to cover complete VARM.
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Acked-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://patchwork.kernel.org/project/dri-devel/patch/20210107175017.15893-5-nirmoy.das@amd.com
2021-01-14 21:20:53 +01:00
Nirmoy Das
192f1bf755
PCI: Add pci_rebar_bytes_to_size()
...
Users of pci_resize_resource() need a way to calculate BAR size
from desired bytes. Add a helper function and export it so that
modular drivers can use it.
Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk >
Signed-off-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Acked-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://patchwork.kernel.org/project/dri-devel/patch/20210107175017.15893-3-nirmoy.das@amd.com
2021-01-14 21:20:53 +01:00
Darren Salt
8fbdbb66f8
PCI: Export pci_rebar_get_possible_sizes()
...
Export pci_rebar_get_possible_sizes() for use by modular drivers.
Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk >
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://patchwork.kernel.org/project/dri-devel/patch/20210107175017.15893-2-nirmoy.das@amd.com
2021-01-14 21:20:41 +01:00