FAILED: patch "[PATCH] drm/tegra: fbdev: Remove offset into framebuffer memory" failed to apply to 6.12-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x a18b6e30ecd69096beda4a0c96d2570900c3879a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072951-goofiness-shank-618d@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a18b6e30ecd69096beda4a0c96d2570900c3879a Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <[email protected]>
Date: Tue, 21 Apr 2026 09:29:06 +0200
Subject: [PATCH] drm/tegra: fbdev: Remove offset into framebuffer memory
The screen_buffer field in struct fb_info contains the kernel address of the first byte of framebuffer memory. Do not add the display offset. This offset only describes scrolling during scanout.
drivers/gpu/drm/tegra/fbdev.c +2 -6
@@ -76,7 +76,6 @@ int tegra_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,struct fb_info *info = helper->info;unsigned int bytes_per_pixel;struct drm_framebuffer *fb; -unsigned long offset;struct tegra_bo *bo;size_t size;int err;
@@ -115,9 +114,6 @@ int tegra_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,drm_fb_helper_fill_info (info, helper, sizes); - offset = info->var.xoffset * bytes_per_pixel + - info->var.yoffset * fb->pitches[0 ]; -if (bo->pages) { bo->vaddr =vmap (bo->pages, bo->num_pages,VM_MAP ,pgprot_writecombine (PAGE_KERNEL ));
@@ -129,9 +125,9 @@ int tegra_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper, } info->flags |=FBINFO_VIRTFB ; - info->screen_buffer = bo->vaddr + offset; + info->screen_buffer = bo->vaddr; info->screen_size = size; - info->fix.smem_start = (unsigned long )(bo->iova + offset); + info->fix.smem_start = (unsigned long )(bo->iova); info->fix.smem_len = size;return 0 ;
Sasha Levin
maintainerPATCH 1/2 drm/fb-helper: Allocate and release fb_info in single place
From: Thomas Zimmermann <[email protected]>
[ Upstream commit 63c971af40365ee706c7e24f6a7900d693518f09 ]
Move the calls to drm_fb_helper_alloc_info() from drivers into a single place in fbdev helpers. Allocates struct fb_info for a new framebuffer device. Then call drm_fb_helper_single_fb_probe() to create an fbdev screen buffer. Also release the instance on errors by calling drm_fb_helper_release_info().
Simplifies the code and fixes the error cleanup for some of the drivers.
Regular release of the struct fb_info instance still happens in drm_fb_helper_fini() as before.
v2:
- remove error rollback in driver implementations (kernel test robot)
- initialize info in TTM implementation (kernel test robot)
Stable-dep-of: a18b6e30ecd6 ("drm/tegra: fbdev: Remove offset into framebuffer memory")
--- drivers/gpu/drm/armada/armada_fbdev.c | 12 +------ drivers/gpu/drm/drm_fb_helper.c | 39 +++++++--------------- drivers/gpu/drm/drm_fbdev_dma.c | 12 ++----- drivers/gpu/drm/drm_fbdev_shmem.c | 12 ++----- drivers/gpu/drm/drm_fbdev_ttm.c | 12 ++----- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 9 +---- drivers/gpu/drm/gma500/fbdev.c | 13 +------- drivers/gpu/drm/i915/display/intel_fbdev.c | 9 +---- drivers/gpu/drm/msm/msm_fbdev.c | 9 +---- drivers/gpu/drm/omapdrm/omap_fbdev.c | 9 +---- drivers/gpu/drm/radeon/radeon_fbdev.c | 13 +------- drivers/gpu/drm/tegra/fbdev.c | 9 +---- include/drm/drm_fb_helper.h | 12 ------- 13 files changed, 26 insertions(+), 144 deletions(-)
drivers/gpu/drm/armada/armada_fbdev.c +1 -11
@@ -43,10 +43,10 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh, struct drm_fb_helper_surface_size *sizes) {struct drm_device *dev = fbh->dev; +struct fb_info *info = fbh->info;struct drm_mode_fb_cmd2 mode;struct armada_framebuffer *dfb;struct armada_gem_object *obj; -struct fb_info *info;int size, ret;void *ptr;
@@ -87,12 +87,6 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh,if (IS_ERR (dfb))return PTR_ERR (dfb); - info =drm_fb_helper_alloc_info (fbh); -if (IS_ERR (info)) { - ret =PTR_ERR (info); - goto err_fballoc; - } - info->fbops = &armada_fb_ops; info->fix.smem_start = obj->phys_addr; info->fix.smem_len = obj->obj.size;
@@ -107,10 +101,6 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh, (unsigned long long)obj->phys_addr);return 0 ; - - err_fballoc: - dfb->fb.funcs->destroy (&dfb->fb); -return ret; } static int armada_fb_probe(struct drm_fb_helper *fbh,
drivers/gpu/drm/drm_fb_helper.c +12 -27
@@ -485,20 +485,7 @@ int drm_fb_helper_init(struct drm_device *dev, }EXPORT_SYMBOL (drm_fb_helper_init); -/** -* drm_fb_helper_alloc_info - allocate fb_info and some of its members -* @fb_helper: driver-allocated fbdev helper -* -* A helper to alloc fb_info and the member cmap. Called by the driver -* within the struct &drm_driver.fbdev_probe callback function. Drivers do -* not need to release the allocated fb_info structure themselves, this is -* automatically done when calling drm_fb_helper_fini(). -* -* RETURNS: -* fb_info pointer if things went okay, pointer containing error code -* otherwise -*/ -struct fb_info *drm_fb_helper_alloc_info (struct drm_fb_helper *fb_helper) +static struct fb_info *drm_fb_helper_alloc_info (struct drm_fb_helper *fb_helper) {struct device *dev = fb_helper->dev->dev;struct fb_info *info;
@@ -525,17 +512,8 @@ struct fb_info *drm_fb_helper_alloc_info(struct drm_fb_helper *fb_helper)framebuffer_release (info);return ERR_PTR (ret); } -EXPORT_SYMBOL (drm_fb_helper_alloc_info); -/** -* drm_fb_helper_release_info - release fb_info and its members -* @fb_helper: driver-allocated fbdev helper -* -* A helper to release fb_info and the member cmap. Drivers do not -* need to release the allocated fb_info structure themselves, this is -* automatically done when calling drm_fb_helper_fini(). -*/ -void drm_fb_helper_release_info (struct drm_fb_helper *fb_helper) +static void drm_fb_helper_release_info (struct drm_fb_helper *fb_helper) {struct fb_info *info = fb_helper->info;
@@ -548,7 +526,6 @@ void drm_fb_helper_release_info(struct drm_fb_helper *fb_helper)fb_dealloc_cmap (&info->cmap);framebuffer_release (info); } -EXPORT_SYMBOL (drm_fb_helper_release_info);/** * drm_fb_helper_unregister_info - unregister fb_info framebuffer device
@@ -1803,6 +1780,11 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper) height = dev->mode_config.max_height;drm_client_modeset_probe (&fb_helper->client, width, height); + + info =drm_fb_helper_alloc_info (fb_helper); +if (IS_ERR (info)) +return PTR_ERR (info); + ret =drm_fb_helper_single_fb_probe (fb_helper);if (ret <0 ) {if (ret == -EAGAIN ) {
@@ -1811,13 +1793,12 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper) }mutex_unlock (&fb_helper->lock); -return ret; + goto err_drm_fb_helper_release_info; }drm_setup_crtcs_fb (fb_helper); fb_helper->deferred_setup = false; - info = fb_helper->info; info->var.pixclock =0 ;/* Need to drop locks to avoid recursive deadlock in
@@ -1840,6 +1821,10 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper)mutex_unlock (&kernel_fb_helper_lock);return 0 ; + +err_drm_fb_helper_release_info: +drm_fb_helper_release_info (fb_helper); +return ret; }/**
drivers/gpu/drm/drm_fbdev_dma.c +2 -10
@@ -280,9 +280,9 @@ int drm_fbdev_dma_driver_fbdev_probe(struct drm_fb_helper *fb_helper, {struct drm_client_dev *client = &fb_helper->client;struct drm_device *dev = fb_helper->dev; +struct fb_info *info = fb_helper->info;struct drm_client_buffer *buffer;struct drm_framebuffer *fb; -struct fb_info *info;u32 format;struct iosys_map map;int ret;
@@ -312,12 +312,6 @@ int drm_fbdev_dma_driver_fbdev_probe(struct drm_fb_helper *fb_helper, fb_helper->buffer = buffer; fb_helper->fb = fb; - info =drm_fb_helper_alloc_info (fb_helper); -if (IS_ERR (info)) { - ret =PTR_ERR (info); - goto err_drm_client_buffer_vunmap; - } -drm_fb_helper_fill_info (info, fb_helper, sizes);if (fb->funcs->dirty)
@@ -325,12 +319,10 @@ int drm_fbdev_dma_driver_fbdev_probe(struct drm_fb_helper *fb_helper,else ret =drm_fbdev_dma_driver_fbdev_probe_tail (fb_helper, sizes);if (ret) - goto err_drm_fb_helper_release_info; + goto err_drm_client_buffer_vunmap;return 0 ; -err_drm_fb_helper_release_info: -drm_fb_helper_release_info (fb_helper); err_drm_client_buffer_vunmap: fb_helper->fb =NULL ; fb_helper->buffer =NULL ;
drivers/gpu/drm/drm_fbdev_shmem.c +2 -10
@@ -110,10 +110,10 @@ static int drm_fbdev_shmem_helper_fb_probe(struct drm_fb_helper *fb_helper, {struct drm_client_dev *client = &fb_helper->client;struct drm_device *dev = fb_helper->dev; +struct fb_info *info = fb_helper->info;struct drm_client_buffer *buffer;struct drm_gem_shmem_object *shmem;struct drm_framebuffer *fb; -struct fb_info *info;u32 format;struct iosys_map map;int ret;
@@ -142,12 +142,6 @@ static int drm_fbdev_shmem_helper_fb_probe(struct drm_fb_helper *fb_helper, fb_helper->buffer = buffer; fb_helper->fb = fb; - info =drm_fb_helper_alloc_info (fb_helper); -if (IS_ERR (info)) { - ret =PTR_ERR (info); - goto err_drm_client_buffer_vunmap; - } -drm_fb_helper_fill_info (info, fb_helper, sizes); info->fbops = &drm_fbdev_shmem_fb_ops;
@@ -168,12 +162,10 @@ static int drm_fbdev_shmem_helper_fb_probe(struct drm_fb_helper *fb_helper, info->fbdefio = &fb_helper->fbdefio; ret =fb_deferred_io_init (info);if (ret) - goto err_drm_fb_helper_release_info; + goto err_drm_client_buffer_vunmap;return 0 ; -err_drm_fb_helper_release_info: -drm_fb_helper_release_info (fb_helper); err_drm_client_buffer_vunmap: fb_helper->fb =NULL ; fb_helper->buffer =NULL ;
drivers/gpu/drm/drm_fbdev_ttm.c +2 -10
@@ -185,8 +185,8 @@ int drm_fbdev_ttm_driver_fbdev_probe(struct drm_fb_helper *fb_helper, {struct drm_client_dev *client = &fb_helper->client;struct drm_device *dev = fb_helper->dev; +struct fb_info *info = fb_helper->info;struct drm_client_buffer *buffer; -struct fb_info *info;size_t screen_size;void *screen_buffer;u32 format;
@@ -214,12 +214,6 @@ int drm_fbdev_ttm_driver_fbdev_probe(struct drm_fb_helper *fb_helper, goto err_drm_client_framebuffer_delete; } - info =drm_fb_helper_alloc_info (fb_helper); -if (IS_ERR (info)) { - ret =PTR_ERR (info); - goto err_vfree; - } -drm_fb_helper_fill_info (info, fb_helper, sizes); info->fbops = &drm_fbdev_ttm_fb_ops;
@@ -236,12 +230,10 @@ int drm_fbdev_ttm_driver_fbdev_probe(struct drm_fb_helper *fb_helper, info->fbdefio = &fb_helper->fbdefio; ret =fb_deferred_io_init (info);if (ret) - goto err_drm_fb_helper_release_info; + goto err_vfree;return 0 ; -err_drm_fb_helper_release_info: -drm_fb_helper_release_info (fb_helper); err_vfree:vfree (screen_buffer); err_drm_client_framebuffer_delete:
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +1 -8
@@ -60,18 +60,11 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,struct drm_fb_helper_surface_size *sizes, struct exynos_drm_gem *exynos_gem) { - struct fb_info *fbi; + struct fb_info *fbi = helper->info;struct drm_framebuffer *fb = helper->fb;unsigned int size = fb->width * fb->height * fb->format->cpp[0 ];unsigned long offset; - fbi =drm_fb_helper_alloc_info (helper); -if (IS_ERR (fbi)) { -DRM_DEV_ERROR (to_dma_dev (helper->dev), -"failed to allocate fb info.\n" ); -return PTR_ERR (fbi); - } - fbi->fbops = &exynos_drm_fb_ops;drm_fb_helper_fill_info (fbi, helper, sizes);
drivers/gpu/drm/gma500/fbdev.c +1 -12
@@ -110,7 +110,7 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper,struct drm_device *dev = fb_helper->dev;struct drm_psb_private *dev_priv =to_drm_psb_private (dev);struct pci_dev *pdev =to_pci_dev (dev->dev); -struct fb_info *info; +struct fb_info *info = fb_helper->info;struct drm_framebuffer *fb;struct drm_mode_fb_cmd2 mode_cmd = { };int size;
@@ -165,12 +165,6 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper, fb_helper->fb = fb; - info =drm_fb_helper_alloc_info (fb_helper); -if (IS_ERR (info)) { - ret =PTR_ERR (info); - goto err_drm_framebuffer_unregister_private; - } - info->fbops = &psb_fbdev_fb_ops;/* Accessed stolen memory directly */
@@ -194,11 +188,6 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper,return 0 ; -err_drm_framebuffer_unregister_private: -drm_framebuffer_unregister_private (fb); - fb->obj[0 ] =NULL ; -drm_framebuffer_cleanup (fb); -kfree (fb); err_drm_gem_object_put:drm_gem_object_put (obj);return ret;
drivers/gpu/drm/i915/display/intel_fbdev.c +1 -8
@@ -183,7 +183,7 @@ static int intelfb_create(struct drm_fb_helper *helper, .type = I915_GTT_VIEW_NORMAL, };intel_wakeref_t wakeref; -struct fb_info *info; +struct fb_info *info = helper->info;struct i915_vma *vma;unsigned long flags =0 ;bool prealloc = false;
@@ -236,13 +236,6 @@ static int intelfb_create(struct drm_fb_helper *helper, goto out_unlock; } - info =drm_fb_helper_alloc_info (helper); -if (IS_ERR (info)) { -drm_err (&dev_priv->drm,"Failed to allocate fb_info (%pe)\n" , info); - ret =PTR_ERR (info); - goto out_unpin; - } - ifbdev->helper.fb = &fb->base; info->fbops = &intelfb_ops;
drivers/gpu/drm/msm/msm_fbdev.c +1 -8
@@ -70,9 +70,9 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, {struct drm_device *dev = helper->dev;struct msm_drm_private *priv = dev->dev_private; +struct fb_info *fbi = helper->info;struct drm_framebuffer *fb =NULL ;struct drm_gem_object *bo; -struct fb_info *fbi =NULL ;uint64_t paddr;uint32_t format;int ret, pitch;
@@ -105,13 +105,6 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, goto fail; } - fbi =drm_fb_helper_alloc_info (helper); -if (IS_ERR (fbi)) { -DRM_DEV_ERROR (dev->dev,"failed to allocate fb info\n" ); - ret =PTR_ERR (fbi); - goto fail; - } -DBG ("fbi=%p, dev=%p" , fbi, dev); helper->fb = fb;
drivers/gpu/drm/omapdrm/omap_fbdev.c +1 -8
@@ -131,9 +131,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,struct omap_fbdev *fbdev =to_omap_fbdev (helper);struct drm_device *dev = helper->dev;struct omap_drm_private *priv = dev->dev_private; +struct fb_info *fbi = helper->info;struct drm_framebuffer *fb =NULL ;union omap_gem_size gsize; -struct fb_info *fbi =NULL ;struct drm_mode_fb_cmd2 mode_cmd = {0 };struct drm_gem_object *bo;dma_addr_t dma_addr;
@@ -199,13 +199,6 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, goto fail; } - fbi =drm_fb_helper_alloc_info (helper); -if (IS_ERR (fbi)) { -dev_err (dev->dev,"failed to allocate fb info\n" ); - ret =PTR_ERR (fbi); - goto fail; - } -DBG ("fbi=%p, dev=%p" , fbi, dev); helper->fb = fb;
drivers/gpu/drm/radeon/radeon_fbdev.c +1 -12
@@ -207,7 +207,7 @@ static int radeon_fbdev_fb_helper_fb_probe(struct drm_fb_helper *fb_helper, {struct radeon_device *rdev = fb_helper->dev->dev_private;struct drm_mode_fb_cmd2 mode_cmd = { }; -struct fb_info *info; +struct fb_info *info = fb_helper->info;struct drm_gem_object *gobj;struct radeon_bo *rbo;struct drm_framebuffer *fb;
@@ -245,13 +245,6 @@ static int radeon_fbdev_fb_helper_fb_probe(struct drm_fb_helper *fb_helper,/* setup helper */ fb_helper->fb = fb; -/* okay we have an object now allocate the framebuffer */ - info =drm_fb_helper_alloc_info (fb_helper); -if (IS_ERR (info)) { - ret =PTR_ERR (info); - goto err_drm_framebuffer_unregister_private; - } - info->fbops = &radeon_fbdev_fb_ops;/* radeon resume is fragile and needs a vt switch to help it along */
@@ -277,10 +270,6 @@ static int radeon_fbdev_fb_helper_fb_probe(struct drm_fb_helper *fb_helper,return 0 ; -err_drm_framebuffer_unregister_private: - fb_helper->fb =NULL ; -drm_framebuffer_unregister_private (fb); -drm_framebuffer_cleanup (fb); err_kfree:kfree (fb); err_radeon_fbdev_destroy_pinned_object:
drivers/gpu/drm/tegra/fbdev.c +1 -8
@@ -72,10 +72,10 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,struct tegra_drm *tegra = helper->dev->dev_private;struct drm_device *drm = helper->dev;struct drm_mode_fb_cmd2 cmd = {0 }; +struct fb_info *info = helper->info;unsigned int bytes_per_pixel;struct drm_framebuffer *fb;unsigned long offset; -struct fb_info *info;struct tegra_bo *bo;size_t size;int err;
@@ -96,13 +96,6 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,if (IS_ERR (bo))return PTR_ERR (bo); - info =drm_fb_helper_alloc_info (helper); -if (IS_ERR (info)) { -dev_err (drm->dev,"failed to allocate framebuffer info\n" ); -drm_gem_object_put (&bo->gem); -return PTR_ERR (info); - } - fb =tegra_fb_alloc (drm, &cmd, &bo,1 );if (IS_ERR (fb)) { err =PTR_ERR (fb);
include/drm/drm_fb_helper.h +0 -12
@@ -246,8 +246,6 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,int drm_fb_helper_restore_fbdev_mode_unlocked (struct drm_fb_helper *fb_helper); -struct fb_info *drm_fb_helper_alloc_info (struct drm_fb_helper *fb_helper); -void drm_fb_helper_release_info (struct drm_fb_helper *fb_helper);void drm_fb_helper_unregister_info (struct drm_fb_helper *fb_helper); void drm_fb_helper_fill_info(struct fb_info *info, struct drm_fb_helper *fb_helper,
@@ -328,16 +326,6 @@ drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)return 0 ; } -static inline struct fb_info * -drm_fb_helper_alloc_info (struct drm_fb_helper *fb_helper) -{ -return NULL ; -} - -static inline void drm_fb_helper_release_info (struct drm_fb_helper *fb_helper) -{ -} -static inline void drm_fb_helper_unregister_info (struct drm_fb_helper *fb_helper) { }
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 drm/tegra: fbdev: Remove offset into framebuffer memory
From: Thomas Zimmermann <[email protected]>
[ Upstream commit a18b6e30ecd69096beda4a0c96d2570900c3879a ]
The screen_buffer field in struct fb_info contains the kernel address of the first byte of framebuffer memory. Do not add the display offset. This offset only describes scrolling during scanout.
--- drivers/gpu/drm/tegra/fbdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/tegra/fbdev.c +2 -6
@@ -75,7 +75,6 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,struct fb_info *info = helper->info;unsigned int bytes_per_pixel;struct drm_framebuffer *fb; -unsigned long offset;struct tegra_bo *bo;size_t size;int err;
@@ -112,9 +111,6 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,drm_fb_helper_fill_info (info, helper, sizes); - offset = info->var.xoffset * bytes_per_pixel + - info->var.yoffset * fb->pitches[0 ]; -if (bo->pages) { bo->vaddr =vmap (bo->pages, bo->num_pages,VM_MAP ,pgprot_writecombine (PAGE_KERNEL ));
@@ -126,9 +122,9 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, } info->flags |=FBINFO_VIRTFB ; - info->screen_buffer = bo->vaddr + offset; + info->screen_buffer = bo->vaddr; info->screen_size = size; - info->fix.smem_start = (unsigned long )(bo->iova + offset); + info->fix.smem_start = (unsigned long )(bo->iova); info->fix.smem_len = size;return 0 ;
Signature · 1 line
2.53.0
Patch "drm/tegra: fbdev: Remove offset into framebuffer memory" has been added to the 6.12-stable tree
This is a note to let you know that I've just added the patch titled
drm/tegra: fbdev: Remove offset into framebuffer memory
to the 6.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-tegra-fbdev-remove-offset-into-framebuffer-memory.patch
and it can be found in the queue-6.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Fri Jul 31 13:23:29 2026
From: Sasha Levin <[email protected]>
Date: Fri, 31 Jul 2026 07:10:52 -0400
Subject: drm/tegra: fbdev: Remove offset into framebuffer memory
To: [email protected]
Cc: Thomas Zimmermann <[email protected]>, [email protected], [email protected], Thierry Reding <[email protected]>, Sasha Levin <[email protected]>
Message-ID: <[email protected]>
From: Thomas Zimmermann <[email protected]>
[ Upstream commit a18b6e30ecd69096beda4a0c96d2570900c3879a ]
The screen_buffer field in struct fb_info contains the kernel address of the first byte of framebuffer memory. Do not add the display offset. This offset only describes scrolling during scanout.
--- drivers/gpu/drm/tegra/fbdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/tegra/fbdev.c +2 -6
@@ -75,7 +75,6 @@ static int tegra_fbdev_probe(struct drm_struct fb_info *info = helper->info;unsigned int bytes_per_pixel;struct drm_framebuffer *fb; -unsigned long offset;struct tegra_bo *bo;size_t size;int err;
@@ -112,9 +111,6 @@ static int tegra_fbdev_probe(struct drm_drm_fb_helper_fill_info (info, helper, sizes); - offset = info->var.xoffset * bytes_per_pixel + - info->var.yoffset * fb->pitches[0 ]; -if (bo->pages) { bo->vaddr =vmap (bo->pages, bo->num_pages,VM_MAP ,pgprot_writecombine (PAGE_KERNEL ));
@@ -126,9 +122,9 @@ static int tegra_fbdev_probe(struct drm_ } info->flags |=FBINFO_VIRTFB ; - info->screen_buffer = bo->vaddr + offset; + info->screen_buffer = bo->vaddr; info->screen_size = size; - info->fix.smem_start = (unsigned long )(bo->iova + offset); + info->fix.smem_start = (unsigned long )(bo->iova); info->fix.smem_len = size;return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-6.12/wifi-brcmfmac-set-f2-blocksize-to-256-for-bcm43752.patch queue-6.12/net-dsa-mt7530-check-bus-read-errors-in-the-mdio-reg.patch queue-6.12/um-set-parent-death-signal-for-userspace-process.patch queue-6.12/usb-gadget-f_tcm-synchronize-delayed-set_alt-with-teardown.patch queue-6.12/drm-xe-rtp-de-whitelist-oa-registers-for-all-hwe-s-f.patch queue-6.12/media-uapi-rkisp-correct-name-version-enum.patch queue-6.12/net-sxgbe-free-tx-rings-on-rx-allocation-failure.patch queue-6.12/rtase-fix-double-free-of-multi-frag-skb-on-dma-map-f.patch queue-6.12/usb-typec-ucsi-fix-race-condition-and-ordering-in-port-unregistration.patch queue-6.12/drm-xe-introduce-xe_gt_dbg_printer.patch queue-6.12/drm-fb-helper-allocate-and-release-fb_info-in-single-place.patch queue-6.12/drm-xe-rtp-maintain-oa-whitelists-separately.patch queue-6.12/pinctrl-qcom-sc8280xp-add-missing-wakeup-entries-for.patch queue-6.12/forcedeth-fix-uaf-of-txrx_stats-in-nv_remove.patch queue-6.12/alsa-hda-codecs-hdmi-disable-keep-alive-before-audio-format-change.patch queue-6.12/hid-logitech-dj-standardise-hid_report_enum-variable.patch queue-6.12/scsi-libsas-fix-ha-resume-deadlock-and-hisi_sas-disk.patch queue-6.12/netfilter-nft_payload-fix-mask-build-for-partial-fie.patch queue-6.12/bluetooth-iso-fix-timeout-vs-sync_timeout-typo-in-ch.patch queue-6.12/um-set-parent-death-signal-for-ubd-io-thread-process.patch queue-6.12/net-sxgbe-check-descriptor-ring-allocation-failures.patch queue-6.12/ipvs-fix-the-checksum-validations.patch queue-6.12/mptcp-pm-avoid-code-duplication-to-lookup-endp.patch queue-6.12/hwmon-ina2xx-fix-various-overflow-issues.patch queue-6.12/spi-spi-cadence-move-tx-fifo-full-busy-wait-into-fif.patch queue-6.12/powerpc-boot-fix-simpleboot-cpu-node-lookup-check.patch queue-6.12/ata-sata_mv-accept-1-or-2-resources-in-platform-prob.patch queue-6.12/drm-xe-rtp-generalize-whitelist_apply_to_hwe.patch queue-6.12/wifi-mac80211-validate-individual-twt-params-before-.patch queue-6.12/mm-hugetlb-fix-swap-entry-corruption-when-clearing-u.patch queue-6.12/dmaengine-idxd-fix-fdev-setup-failure-cleanup-in-idx.patch queue-6.12/asoc-max98090-fix-missing-is_err-before-ptr_err-on-m.patch queue-6.12/keys-trusted-dcp-fix-key_len-validation-and-calc_blo.patch queue-6.12/drm-xe-oa-de-whitelist-oa-registers-on-oa-stream-ope.patch queue-6.12/mptcp-pm-use-addr-entry-for-get_local_id.patch queue-6.12/drm-xe-rtp-save-oa-nonpriv-registers-to-register-sav.patch queue-6.12/bluetooth-hci_sync-remove-unnecessary-hci_conn_get-i.patch queue-6.12/drm-mediatek-check-crtc-state-before-freeing.patch queue-6.12/bluetooth-iso-clear-iso_data-always-when-detaching-c.patch queue-6.12/bluetooth-iso-fix-leaking-sk-after-socket-release.patch queue-6.12/hwmon-ina2xx-add-support-for-ina260.patch queue-6.12/accel-qaic-use-sizeof-trans_hdr-for-transaction-leng.patch queue-6.12/pinctrl-amd-don-t-clear-s4-wake-bits-at-probe.patch queue-6.12/net-bridge-mrp-fix-option-tlv-length-in-mrp_test-fra.patch queue-6.12/kmemleak-iommu-iova-fix-transient-kmemleak-false-positive.patch queue-6.12/gpio-pch-use-raw_spinlock_t-for-the-register-lock.patch queue-6.12/drm-xe-rtp-refactor-oag-mmio-trigger-register-whitel.patch queue-6.12/hwmon-ina2xx-add-support-for-ina234.patch queue-6.12/drm-xe-apply-whitelist-to-engine-save-restore.patch queue-6.12/powerpc-boot-fix-treeboot-currituck-cpu-node-lookup-.patch queue-6.12/wifi-ath6kl-fix-use-after-free-in-aggr_reset_state.patch queue-6.12/wifi-brcmfmac-fix-43752-sdio-fwvid-incorrectly-labelled-as-cypress-cyw.patch queue-6.12/keys-make-keyring-key-chunk-byte-order-agree-with-ke.patch queue-6.12/drm-xe-rtp-toggle-deny-bit-to-de-whitelist-oa-regs.patch queue-6.12/hwmon-adt7470-fix-fans-stuck-in-manual-mode-on-i2c-e.patch queue-6.12/net-airoha-fix-register-index-for-tx-fwd-counter-con.patch queue-6.12/ata-ahci_ceva-fix-error-paths-in-ceva_ahci_platform_.patch queue-6.12/qede-sync-udp_tunnel-ports-outside-qede_lock-in-the-.patch queue-6.12/tracing-mmiotrace-reset-dropped_count-in-mmio_reset_.patch queue-6.12/netfilter-nf_conntrack_sip-widen-nat-rewrite-delta-t.patch queue-6.12/drm-i915-hdcp-move-to-using-intel_display-in-intel_hdcp.patch queue-6.12/usb-typec-ucsi-split-connector-lock-classes.patch queue-6.12/ahci-introduce-ahci_ignore_port-helper.patch queue-6.12/drm-i915-hdcp-require-monotonically-increasing-seq_num_v.patch queue-6.12/net-udp_tunnel-fix-memory-leak-in-udp_tunnel_nic_unr.patch queue-6.12/bluetooth-iso-validate-sockaddr_iso-first-in-iso_soc.patch queue-6.12/net-libwx-fix-fdir-atr-queue-mismatch-for-software-v.patch queue-6.12/riscv-mm-fix-out-of-bounds-page-table-walk-during-me.patch queue-6.12/netfilter-nf_tables-make-nft_object-rhltable-per-tab.patch queue-6.12/mm-huge_memory-unlock-i_mmap_rwsem-before-releasing-.patch queue-6.12/bluetooth-l2cap-fix-uaf-in-l2cap_le_connect_rsp.patch queue-6.12/hwmon-ina226-add-support-for-sy24655.patch queue-6.12/scsi-zfcp-fix-memory-leak-during-adapter-release-by-.patch queue-6.12/mptcp-pm-userspace-fix-use-after-free-in-get_local_id.patch queue-6.12/hwmon-ina2xx-make-it-easier-to-add-more-devices.patch queue-6.12/net-dsa-mt7530-error-out-on-failed-reads-in-mt7531-p.patch queue-6.12/scsi-libiscsi_tcp-bound-scsi-response-data-segment-t.patch queue-6.12/bluetooth-hci_conn-hold-conn-reference-in-abort_conn.patch queue-6.12/ipvs-do-not-mangle-icmp-replies-for-non-first-fragme.patch queue-6.12/phy-zynqmp-fix-clock-error-handling-in-xpsgtr_phy_in.patch queue-6.12/asoc-max98095-fix-missing-is_err-before-ptr_err-on-m.patch queue-6.12/hid-logitech-dj-fix-wrong-detection-of-bad-dj_short-.patch queue-6.12/rds-tcp-hold-the-rcu-lock-across-ipv6_chk_addr-in-rd.patch queue-6.12/drm-xe-rtp-ensure-locking-ref-counting-for-oa-whitel.patch queue-6.12/um-add-os_set_pdeathsig-helper-function.patch queue-6.12/hwmon-lm90-only-report-alarms-if-driver-is-ready.patch queue-6.12/of-reserved_mem-add-code-to-dynamically-allocate-res.patch queue-6.12/bpf-reset-register-bounds-before-narrowing-retval-ra.patch queue-6.12/drm-xe-rtp-keep-track-of-non-oa-nonpriv-slots.patch queue-6.12/net-ethernet-mtk_eth_soc-support-named-irqs.patch queue-6.12/wifi-brcmfmac-drain-bus_reset-work-on-device-removal.patch queue-6.12/hwmon-adt7470-fix-divide-by-zero-toctou-crash-in-fan.patch queue-6.12/mptcp-add-mptcp_userspace_pm_lookup_addr-helper.patch queue-6.12/drm-sched-store-the-drm-client_id-in-drm_sched_fence.patch queue-6.12/of-reserved_mem-prevent-oob-when-too-many-dynamic-re.patch queue-6.12/hwmon-adt7470-fix-temperature-alarm-logic-in-hwmon_t.patch queue-6.12/ksmbd-return-success-for-deferred-final-close.patch queue-6.12/hwmon-ina2xx-add-support-for-has_alerts-configuratio.patch queue-6.12/drm-tegra-fbdev-remove-offset-into-framebuffer-memory.patch queue-6.12/scsi-ufs-core-cancel-rtc-work-in-active-active-suspe.patch queue-6.12/drm-exec-remove-the-index-parameter-from-drm_exec_for_each_locked_obj.patch queue-6.12/hwmon-adt7470-fix-cache-updated-before-hardware-writ.patch queue-6.12/assoc_array-trim-the-final-shortcut-word-using-the-c.patch queue-6.12/mm-kmemleak-fix-checksum-computation-for-per-cpu-objects.patch queue-6.12/ksmbd-fix-use-after-free-in-__close_file_table_ids.patch queue-6.12/drm-xe-wait-on-external-bo-kernel-fences-in-exec-ioctl.patch queue-6.12/drm-amdgpu-gfx-fix-cleaner-shader-ib-buffer-overflow.patch queue-6.12/netfilter-xt_hashlimit-validate-hashtable-supports-x.patch queue-6.12/scsi-target-iblock-fix-wrong-pr-ops-null-check-for-p.patch queue-6.12/net-ethernet-mtk_eth_soc-add-consts-for-irq-index.patch queue-6.12/hwmon-adt7470-fix-swapped-pwm3-and-pwm4-auto-mode-ma.patch queue-6.12/media-chips-media-wave5-support-cbp-profile.patch queue-6.12/um-use-os_set_pdeathsig-helper-in-winch-thread-proce.patch queue-6.12/idpf-fix-mailbox-irq-name-leak-on-request-failure.patch queue-6.12/drm-i915-vrr-check-has_vrr-first-in-intel_vrr_is_capable.patch queue-6.12/btrfs-fix-leaking-btrfs_fs_state_remounting-flag.patch queue-6.12/netfilter-br_netfilter-reallocate-headroom-if-necess.patch queue-6.12/idpf-adjust-txq-ring-count-minimum.patch queue-6.12/pinctrl-qcom-unconditionally-mark-gpio-as-wakeup-ena.patch queue-6.12/gpio-sloppy-logic-analyzer-fix-memory-leak-in-gpio_l.patch queue-6.12/keys-fix-out-of-bounds-read-in-keyring_get_key_chunk.patch queue-6.12/drm-amdgpu-fix-context-pstate-override-handling.patch queue-6.12/hwmon-sht3x-fix-unaligned-accesses.patch queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch queue-6.12/fs-proc-task_mmu-fix-pagemap_scan-written-state-for-.patch queue-6.12/hwmon-adt7470-use-cached-pwm-frequency-value.patch queue-6.12/hwmon-pmbus-fix-return-value-from-pmbus_update_byte_.patch queue-6.12/phy-zynqmp-fix-runtime-pm-leak-on-probe-allocation-f.patch queue-6.12/scsi-libiscsi-fix-stale-data-leak-into-the-scsi-sens.patch queue-6.12/tracing-mmiotrace-add-null-check-for-mmio_trace_arra.patch queue-6.12/drm-xe-rtp-add-ring_force_to_nonpriv_deny-to-oa-whit.patch queue-6.12/spi-spi-cadence-supports-transmission-with-bits_per_.patch queue-6.12/kunit-tool-skip-stty-when-stdin-is-not-a-tty.patch queue-6.12/um-preserve-errno-within-signal-handler.patch queue-6.12/ipvs-fix-places-with-wrong-packet-offsets.patch queue-6.12/hwmon-adt7470-fix-pwm-auto-temp-state-array-and-boun.patch queue-6.12/hwmon-ina2xx-shift-ina234-shunt-and-current-register.patch queue-6.12/drm-amdgpu-give-each-kernel-job-a-unique-id.patch queue-6.12/netconsole-avoid-oob-reads-msg-is-not-nul-terminated.patch queue-6.12/bluetooth-hci_sync-make-hci_cmd_sync_run_once-return.patch queue-6.12/hwmon-adt7470-fix-busy-loop-and-i2c-flooding-in-upda.patch queue-6.12/bluetooth-iso-avoid-deadlocks-in-iso_sock_timeout.patch queue-6.12/hwmon-nct6775-core-fix-number-of-temperature-registe.patch queue-6.12/hwmon-nct6775-core-prevent-access-to-unsupported-wei.patch queue-6.12/dmaengine-sun6i-dma-fix-reclaim-descriptors-while-te.patch queue-6.12/drm-xe-hold-a-dma-buf-reference-for-imported-bos.patch queue-6.12/sched-deadline-use-revised-wakeup-rule-only-for-runn.patch queue-6.12/rds-fix-inet6_addr_lst-null-dereference-when-ipv6-is.patch queue-6.12/media-i2c-imx219-rename-vts-to-frm_length.patch queue-6.12/smb-client-fix-buffer-leaks-in-smb1-read-and-write.patch queue-6.12/scsi-target-clear-cmd_cnt-when-initial-counter-enrol.patch queue-6.12/lib-alloc_tag-introduce-mem_alloc_profiling_permanen.patch queue-6.12/bluetooth-hci_sync-fix-hci_conn_del-use-in-hci_le_cr.patch queue-6.12/net-phylink-put-link_gpio-if-phylink_create-fails.patch queue-6.12/btrfs-zoned-fix-deadlock-between-metadata-writeback-.patch queue-6.12/media-imx219-fix-maximum-frame-length-in-lines.patch queue-6.12/tracing-remove-trace_event_fl_filtered-logic.patch queue-6.12/drm-i915-vrr-require-valid-min-max-vfreq-for-vrr.patch queue-6.12/um-set-parent-death-signal-for-write_sigio-thread-pr.patch queue-6.12/hwmon-nzxt-smart2-dma-align-output-buffer.patch queue-6.12/rhashtable-clear-stale-iter-p-on-table-restart.patch queue-6.12/drm-amdgpu-respect-placement-requirements-in-amdgpu_gtt_mgr-functions.patch queue-6.12/powerpc-boot-fix-treeboot-akebono-cpu-node-lookup-ch.patch queue-6.12/hwmon-ltc4282-fix-reading-the-minimum-alarm-voltage.patch queue-6.12/thunderbolt-prevent-xdomain-delayed-work-use-after-f.patch queue-6.12/ata-libahci_platform-support-non-consecutive-port-nu.patch queue-6.12/octeontx2-pf-set-correct-sequence-for-carrier-off-an.patch queue-6.12/net-mpls-initialize-rtm_tos-in-mpls_getroute.patch queue-6.12/um-set-parent-death-signal-for-winch-thread-process.patch queue-6.12/netfilter-nf_conntrack_expect-restore-helper-propaga.patch queue-6.12/bluetooth-btintel-validate-length-before-parsing-dia.patch queue-6.12/net-ethernet-mtk_eth_soc-pass-eth-to-mtk_handle_irq_.patch queue-6.12/drivers-hv-vmbus-replace-lockdep_hardirq_threaded-wi.patch queue-6.12/drm-xe-rename-___xe_bo_create_locked.patch queue-6.12/hid-logitech-dj-prevent-report_id_dj_short-related-u.patch queue-6.12/net-do-not-send-icmp-ndisc-redirects-when-peer-alloc.patch queue-6.12/phy-zynqmp-postpone-getting-clock-rate-until-actuall.patch queue-6.12/kunit-tool-terminate-kernel-under-test-on-sigint.patch queue-6.12/can-isotp-check-register_netdevice_notifier-error-in.patch