Dave Airlie
5977ffeaf3
drm/vram-helper: remove populate/unpopulate
...
The default path for populate/unpopulate is already this.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-8-airlied@gmail.com
2020-08-06 12:16:36 +10:00
Dave Airlie
20784cdf4b
drm/ttm: use a helper for unlocked moves to the lru tail
...
The pattern was repeated a few times, just make an inline for it.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-7-airlied@gmail.com
2020-08-06 12:16:33 +10:00
Dave Airlie
46bca88bbd
drm/ttm/amdgpu: consolidate ttm reserve paths
...
Drop the WARN_ON and consolidate the two paths into one.
Use the consolidate slowpath in the execbuf utils code.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-6-airlied@gmail.com
2020-08-06 12:16:31 +10:00
Dave Airlie
9c4cbb3a66
qxl/ttm: drop the unusued no wait flag to reserve function
...
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-5-airlied@gmail.com
2020-08-06 12:16:29 +10:00
Dave Airlie
bd549d35b4
nouveau: use ttm populate mapping functions. (v2)
...
Instead of rolling driver copies of them.
v2: cleanup return handling (Ben)
Reviewed-by: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-4-airlied@gmail.com
2020-08-06 12:16:26 +10:00
Dave Airlie
a2d6ddc417
drm/vmwgfx: drop bo map/unmap dma functions.
...
The map one was used once, just inline it, and drop them both.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-3-airlied@gmail.com
2020-08-06 12:16:25 +10:00
Dave Airlie
56dc01f18d
drm/vmwgfx: consolidate ttm object creation and populate
...
These two functions has the same code in them, create a common
helper function instead.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-2-airlied@gmail.com
2020-08-06 12:16:22 +10:00
Tom Rix
8e1ba47c60
video: fbdev: pvr2fb: initialize variables
...
clang static analysis reports this repesentative error
pvr2fb.c:1049:2: warning: 1st function call argument
is an uninitialized value [core.CallAndMessage]
if (*cable_arg)
^~~~~~~~~~~~~~~
Problem is that cable_arg depends on the input loop to
set the cable_arg[0]. If it does not, then some random
value from the stack is used.
A similar problem exists for output_arg.
So initialize cable_arg and output_arg.
Signed-off-by: Tom Rix <trix@redhat.com >
Acked-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200720191845.20115-1-trix@redhat.com
2020-08-05 19:47:22 +02:00
Thomas Zimmermann
d3dc135187
drm/mgag200: Set PCI option register in G200SE models
...
The initial value of the PCI option register got lost while refactoring
the driver init code. Restore the setting.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reported-by: kernel test robot <lkp@intel.com >
Fixes: 2021708e0d ("drm/mgag200: Initialize PCI registers early during device setup")
Cc: Lyude Paul <lyude@redhat.com >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Emil Velikov <emil.velikov@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200804065158.21049-1-tzimmermann@suse.de
2020-08-05 08:07:35 +02:00
Gustavo A. R. Silva
ad04fae0de
fbdev: Use fallthrough pseudo-keyword
...
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200707210539.GA12530@embeddedor
2020-08-03 21:38:37 +02:00
Linus Walleij
85806f6d58
omapfb/dss: Include the right header
...
The hdmi4.c and hdmi5.c files include the legacy GPIO
header <linux/gpio.h> but does not use any of the symbols
from this file.
What it does use is the implicit inclusion of <linux/of.h>
leading to compile errors if we just drop this include.
Include the right header.
Cc: Tony Lindgren <tony@atomide.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200706125931.752539-1-linus.walleij@linaro.org
2020-08-03 20:03:55 +02:00
Thomas Zimmermann
2d05f56af8
fbdev: Remove trailing whitespace
...
Removes trailing whitespaces in several places.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200729134148.6855-2-tzimmermann@suse.de
2020-08-03 10:02:15 +02:00
Thomas Zimmermann
e20dfd27f7
drm/mgag200: Add support for G200 desktop cards
...
This patch adds support for G200 desktop cards. We can reuse the whole
memory and modesetting code. A few PCI and DAC register values have to
be updated accordingly.
The most significant change is in the PLL setup. The driver parses the
device's BIOS to retrieve clock limits and reference clocks. With no BIOS
found, safe defaults are being used.
v2:
* copy BIOS ROM to system memory and access with regular
load/store; resolves potential HW limitations
* fix some stray whitespaces
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Co-developed-by: Egbert Eich <eich@suse.com >
Signed-off-by: Egbert Eich <eich@suse.com >
Co-developed-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-9-tzimmermann@suse.de
2020-08-03 09:43:00 +02:00
Thomas Zimmermann
fb18825fa0
drm/mgag200: Move G200SE's unique id into model-specific data
...
The unique revision id is only useful for G200SE devices. Store the
value in model-specific data within struct mga_device. While at it,
the patch also adds an init helper for the value.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-8-tzimmermann@suse.de
2020-08-03 09:42:52 +02:00
Thomas Zimmermann
9053cad2f0
drm/mgag200: Clear <page> field during MM init
...
The modesetting code initialized the memory-related register CRTCEXT4.
Move this code to MM initialization.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-7-tzimmermann@suse.de
2020-08-03 09:42:44 +02:00
Thomas Zimmermann
b9fa77ec1a
drm/mgag200: Set MISC memory flags in mm init code
...
The modesetting code initialized several memory-related flags in the
MISC register. Move this code to MM initialization.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-6-tzimmermann@suse.de
2020-08-03 09:42:35 +02:00
Thomas Zimmermann
78e5b5036a
drm/mgag200: Enable MGA mode during device register initialization
...
MGA cards can run in traditional VGA mode or an enhanced MGA mode; with
the latter being required for KMS. So far, MGA mode was enabled during
modesetting. As it's fundamental for device operation, the patch moves
it next to the device register setup.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-5-tzimmermann@suse.de
2020-08-03 09:42:27 +02:00
Thomas Zimmermann
2021708e0d
drm/mgag200: Initialize PCI registers early during device setup
...
So far, PCI option registers were initialized as part of modesetting,
which is late in the process. As these registers control fundamental
operation, they should be set early.
The patch moves the PCI option handling into device register setup,
before even the device MMIO memory is being mapped. No functional
changes made.
Moving the PCI code next to the device-register setup also allows to
remove the has_sdram field from struct mga_device. The state is now
local to the init helper.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-4-tzimmermann@suse.de
2020-08-03 09:42:19 +02:00
Thomas Zimmermann
42452165dc
drm/mgag200: Move register initialization into helper function
...
The mgag200 driver maps registers into the address space. Move the
code into a separate helper function. No functional changes.
One small difference is in the handling of SDRAM/SGRAM. MGA devices
can come with either SDRAM or SGRAM. So far, the driver checked for
SDRAM, which is the common case. The patch moves this code into a
separate helper and checks for SGRAM, which is the special case. The
test itself is the same as before.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-3-tzimmermann@suse.de
2020-08-03 09:42:11 +02:00
Thomas Zimmermann
0b34d58b6c
drm/mgag200: Enable caching for SHMEM pages
...
SHMEM pages use write-combine caching by default, but can also use the
platform's default page caching. Doing so may improve the performance
of I/O on the framebuffer.
Mgag200's hardware does not access framebuffer pages directly (i.e.,
via DMA), so enabling caching does not have an effect on consistency
of the framebuffer memory or the displayed data.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-2-tzimmermann@suse.de
2020-08-03 09:42:03 +02:00
Thomas Zimmermann
cff0adca1e
drm/ast: Managed device release
...
This turns the ast's device cleanup code into a managed release helper
function. Note that the code uses devres helpers. The release function
switches the device back to VGA mode and therefore runs during HW device
cleanup; not at DRM device cleanup.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-10-tzimmermann@suse.de
2020-08-03 09:05:00 +02:00
Thomas Zimmermann
4bc85b82c8
drm/ast: Manage release of firmware backup memory
...
The ast driver keeps a backup copy of the DP501 encoder's firmware. This
patch adds managed release of the allocated memory.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-9-tzimmermann@suse.de
2020-08-03 09:04:44 +02:00
Thomas Zimmermann
2c0b6566d6
drm/ast: Managed release of ast firmware
...
The ast driver loads firmware for the DP501 display encoder. The
patch replaces the removal code with a managed release function.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-8-tzimmermann@suse.de
2020-08-03 09:04:37 +02:00
Thomas Zimmermann
e0f5a738cf
drm/ast: Embed struct drm_device in struct ast_private
...
Turns struct ast_private into a subclass of struct drm_device by
embedding the latter. This allows for using DRM's managed device
allocation.
The use of struct drm_device.dev_private is deprecated. The patch
converts the last remaining users to to_ast_private().
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-7-tzimmermann@suse.de
2020-08-03 09:04:28 +02:00
Thomas Zimmermann
21d79b690e
drm/ast: Don't use ast->dev if dev is available
...
Several places in ast use ast->dev, when a dev pointer is already
available within the function. Remove the extra indirection. No
functional changes made.
This is just a small cleanup before embedding the DRM device instance
in struct ast_private.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-6-tzimmermann@suse.de
2020-08-03 09:04:18 +02:00
Thomas Zimmermann
365c0e70da
drm/ast: Replace struct_drm_device.dev_private with to_ast_private()
...
The ast code still references dev_private in several place when looking
up the ast device structure. Convert the remaining locations to use
to_ast_private().
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-5-tzimmermann@suse.de
2020-08-03 09:04:10 +02:00
Thomas Zimmermann
fbe01716ed
drm/ast: Replace driver load/unload functions with device create/destroy
...
The ast driver's load and unload functions are left-overs from when
struct drm_driver.load/unload was still in use. The PCI probe helper
allocated the DRM device and ran load to initialize it.
This patch replaces this code with device create and destroy. The
main difference is that the device's create function allocates the
DRM device and ast structures in the same place. This will be required
for switching ast to managed allocations.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-4-tzimmermann@suse.de
2020-08-03 09:04:01 +02:00
Thomas Zimmermann
d50ace1e72
drm/ast: Separate DRM driver from PCI code
...
Putting the DRM driver to the top of the file and the PCI code to the
bottom makes ast_drv.c more readable. While at it, the patch prefixes
file-scope variables with ast_.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-3-tzimmermann@suse.de
2020-08-03 09:03:54 +02:00
Thomas Zimmermann
6a470dc2a1
drm/ast: Embed CRTC and connector in struct ast_private
...
Only single instances of CRTC and connector are supported per
device. Embed both in ast's structure and remove the individual
memory allocations. DRM's CRTC cleanup helpers replace the rsp.
destroy function in ast.
While at it, also convert to_ast_connector() to a function.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-2-tzimmermann@suse.de
2020-08-03 09:03:47 +02:00
Daniel Vetter
70eca5d5d3
drm/syncobj: Tune down unordered timeline DRM_ERROR
...
Userspace can provoke this, we generally don't allow userspace to spam
dmesg. Tune it down to debug. Unfortunately we don't have easy access
to the drm_device here (not at all without changing a few things), so
leave it as old style dmesg output for now.
References: https://patchwork.freedesktop.org/series/80146/
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: "Christian König" <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200801092625.1107609-1-daniel.vetter@ffwll.ch
2020-08-02 15:22:31 +02:00
Melissa Wen
0986191186
drm/vkms: fix xrgb on compute crc
...
The previous memset operation was not correctly zeroing the alpha
channel to compute the crc, and as a result, the IGT subtest
kms_cursor_crc/pipe-A-cursor-alpha-transparent fails.
Fixes: db7f419c06 ("drm/vkms: Compute CRC with Cursor Plane")
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730202524.5upzuh4irboru7my@smtp.gmail.com
2020-08-02 15:22:31 +02:00
Marek Vasut
07c913c4d7
drm/panel: simple: Add Chefree CH101OLHLWH-002 panel
...
Add support for the Chefree CH101OLHLWH-002 10.1" (1280x800)
color TFT LCD panel, connected over LVDS.
Timings are taken from the datasheet version P0.5.
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: dri-devel@lists.freedesktop.org
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: devicetree@vger.kernel.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200728201242.4336-3-marex@denx.de
2020-08-02 09:09:59 +02:00
Marek Vasut
44de5cee20
dt-bindings: Add DT bindings for Chefree CH101OLHLWH-002
...
Add DT bindings for Chefree CH101OLHLWH-002 10.1" 1280x800 LCD.
This panel is connected via LVDS.
Signed-off-by: Marek Vasut <marex@denx.de >
Acked-by: Rob Herring <robh@kernel.org >
Cc: dri-devel@lists.freedesktop.org
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: devicetree@vger.kernel.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200728201242.4336-2-marex@denx.de
2020-08-02 09:09:27 +02:00
Marek Vasut
1d865be986
dt-bindings: Add vendor prefix for Chefree
...
The Chefree Technology Corp. is an LCD panel manufacturer.
Signed-off-by: Marek Vasut <marex@denx.de >
Acked-by: Rob Herring <robh@kernel.org >
Cc: dri-devel@lists.freedesktop.org
Cc: Rob Herring <robh+dt@kernel.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
Cc: devicetree@vger.kernel.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200728201242.4336-1-marex@denx.de
2020-08-02 09:08:19 +02:00
Bernard Zhao
c3ee8c65f6
drm/panel: remove return value of function drm_panel_add
...
The function "int drm_panel_add(struct drm_panel *panel)"
always returns 0, this return value is meaningless.
Also, there is no need to check return value which calls
"drm_panel_add and", error branch code will never run.
Signed-off-by: Bernard Zhao <bernard@vivo.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200801120216.8488-1-bernard@vivo.com
2020-08-02 08:59:06 +02:00
Christian König
1a3fb59085
drm/ttm: remove the init_mem_type callback
...
It is a very strange concept to call a function which just
calls back the caller for the functions parameters.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382085/
2020-07-31 17:14:37 +02:00
Christian König
ded9f8eadd
drm/vram-helper: stop implementing init_mem_type
...
Instead just initialize the memory type parameters
before calling ttm_bo_init_mm.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382086/
2020-07-31 17:14:26 +02:00
Christian König
ccd0dc437f
drm/qxl: stop implementing init_mem_type
...
Instead just initialize the memory type parameters
before calling ttm_bo_init_mm.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382083/
2020-07-31 17:14:09 +02:00
Christian König
009869fde9
drm/nouveau: stop implementing init_mem_type
...
Instead just initialize the memory type parameters
before calling ttm_bo_init_mm.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382081/
2020-07-31 17:13:58 +02:00
Christian König
3629ca5dfb
drm/vmwgfx: stop implementing init_mem_type v2
...
Instead just initialize the memory type parameters
before calling ttm_bo_init_mm.
v2: keep extra system domain handling
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382082/
2020-07-31 17:13:46 +02:00
Christian König
473633540c
drm/amdgpu: stop implementing init_mem_type
...
Instead just initialize the memory type parameters
before calling ttm_bo_init_mm.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382084/
2020-07-31 17:13:34 +02:00
Christian König
b0691b34f1
drm/radeon: stop implementing init_mem_type
...
Instead just initialize the memory type parameters
before calling ttm_bo_init_mm.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382080/
2020-07-31 17:13:22 +02:00
Christian König
be1213a341
drm/ttm: remove TTM_MEMTYPE_FLAG_FIXED v2
...
Instead use a boolean field in the memory manager structure.
Also invert the meaning of the field since the use of a TT
structure is the special case here.
v2: cleanup zero init.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/382079/
2020-07-31 17:13:09 +02:00
Christian König
418d2ad1ac
drm/ttm: initialize the system domain with defaults v2
...
Instead of repeating that in each driver.
v2: keep the caching limitation for VMWGFX for now.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/382078/
2020-07-31 17:12:51 +02:00
Paul Cercueil
38ee474fc6
drm/ingenic: ipu: Only enable clock when needed
...
Instead of keeping the IPU clock enabled constantly, enable and disable
it on demand, when the IPU plane is used. That way, we won't use any
extra power when the IPU is not used.
v2: Explain the reason of this patch
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730144830.10479-4-paul@crapouillou.net
2020-07-30 18:19:57 +02:00
Paul Cercueil
c0fd208ee3
drm/ingenic: ipu: Remove YUV422 from supported formats on JZ4725B
...
When configuring the IPU for packed YUV 4:2:2, depending on the scaling
ratios given by the source and destination resolutions, it is possible
to crash the IPU block, to the point where a software reset of the IP
does not fix it. This can happen anytime, in the first few frames, or
after dozens of minutes. The same crash also happens when the IPU is
fully controlled by the LCD controller (in that case no HW register is
written at any moment after startup), which points towards a hardware
bug.
Thanksfully multiplanar YUV is not affected.
Until this bug is fixed or worked around, address this issue by removing
support for YUV 4:2:2 on the IPU of the JZ4725B.
v2: Update commit message (remove the "crash beyond repair" bit)
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730144830.10479-3-paul@crapouillou.net
2020-07-30 18:19:52 +02:00
Paul Cercueil
3debcdf066
drm/ingenic: ipu: Only restart manually on older SoCs
...
On older SoCs, it is necessary to restart manually the IPU when a frame
is done processing. Doing so on newer SoCs (JZ4760/70) kinds of work
too, until the input or output resolutions or the framerate are too
high.
Make it work properly on newer SoCs by letting the LCD controller
trigger the IPU frame restart signal.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20200730144830.10479-2-paul@crapouillou.net
2020-07-30 18:19:49 +02:00
Pekka Paalanen
cfb9b89f11
drm/doc: device hot-unplug for userspace
...
Set up the expectations on how hot-unplugging a DRM device should look like to
userspace.
Written by Daniel Vetter's request and largely based on his comments in IRC and
from https://lists.freedesktop.org/archives/dri-devel/2020-May/265484.html .
A related Wayland protocol change proposal is at
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/35
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Sean Paul <sean@poorly.run >
Cc: Simon Ser <contact@emersion.fr >
Cc: Ben Skeggs <skeggsb@gmail.com >
Cc: Karol Herbst <kherbst@redhat.com >
Acked-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Emil Velikov <emil.velikov@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200707113805.30936-1-ppaalanen@gmail.com
2020-07-30 14:13:49 +01:00
Tian Tao
85b3bfa266
drm/hisilicon: Fixed the warning: Assignment of 0/1 to bool variable
...
fixed the following warning:
hibmc_drm_drv.c:296:1-18:WARNING: Assignment of 0/1 to bool variable.
hibmc_drm_drv.c:301:2-19: WARNING: Assignment of 0/1 to bool variable.
v2:
using the pci_dev.msi_enabled instead of priv->msi_enabled.
v3:
just call pci_enable_msi() and pci_disable_msi(), it's no need to
set dev->pdev->msi_enabled again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Reviewed-By: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/1595940907-17874-1-git-send-email-tiantao6@hisilicon.com
2020-07-29 08:48:19 +02:00
Paul Cercueil
639abb72f1
drm/ingenic: Validate mode in a .mode_valid callback
...
Validate modes in the drm_crtc_helper_funcs.mode_valid() callback, which
is designed for this purpose, instead of doing it in
drm_crtc_helper_funcs.atomic_check().
Signed-off-by: Paul Cercueil <paul@crapouillou.net >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200728151641.26124-3-paul@crapouillou.net
2020-07-29 02:29:46 +02:00