mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
drm/rockchip: fix fbdev on non-IOMMU devices
[ Upstream commitab78c74cfc
] When switching to the generic fbdev infrastructure, it was missed that framebuffers were created with the alloc_kmap parameter to rockchip_gem_create_object() set to true. The generic infrastructure calls this via the .dumb_create() driver operation and thus creates a buffer without an associated kmap. alloc_kmap only makes a difference on devices without an IOMMU, but when it is missing rockchip_gem_prime_vmap() fails and the framebuffer cannot be used. Detect the case where a buffer is being allocated for the framebuffer and ensure a kernel mapping is created in this case. Fixes:24af7c34b2
("drm/rockchip: use generic fbdev setup") Reported-by: Johan Jonker <jbx6244@gmail.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20221020181248.2497065-1-john@metanate.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8499382825
commit
0d44ab965d
1 changed files with 4 additions and 1 deletions
|
@ -364,9 +364,12 @@ rockchip_gem_create_with_handle(struct drm_file *file_priv,
|
|||
{
|
||||
struct rockchip_gem_object *rk_obj;
|
||||
struct drm_gem_object *obj;
|
||||
bool is_framebuffer;
|
||||
int ret;
|
||||
|
||||
rk_obj = rockchip_gem_create_object(drm, size, false);
|
||||
is_framebuffer = drm->fb_helper && file_priv == drm->fb_helper->client.file;
|
||||
|
||||
rk_obj = rockchip_gem_create_object(drm, size, is_framebuffer);
|
||||
if (IS_ERR(rk_obj))
|
||||
return ERR_CAST(rk_obj);
|
||||
|
||||
|
|
Loading…
Reference in a new issue