# Re: \[PATCH\] fbdev/tcx.c fix mem\_map to correct smem\_start offset

- From: René Rebe \<hidden\>
- Date: 2025-12-02 18:50:39 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2025/12/13467361
- Thread: https://ratatoskr.run/linux-fbdev/2025/11/13467359/t.md

```text
Hallo Helge,

On Tue, 2 Dec 2025 19:43:34 +0100, Helge Deller [ref] wrote:

> On 11/20/25 14:24, René Rebe wrote:
> > 403ae52ac047 ("sparc: fix drivers/video/tcx.c warning") changed the
> > physbase initializing breaking the user-space mmap, e.g. for Xorg
> > entirely.
> > Fix fbdev mmap table so the sbus mmap helper work correctly, and
> > not try to map vastly (physbase) offset memory.
> > Fixes: 403ae52ac047 ("sparc: fix drivers/video/tcx.c warning")
> > Signed-off-by: René Rebe <redacted>
> 
> Applied to fbdev.
> 
> Rene, shouldn't it be backported to all old Linux kernels?
> Should I add a stable tag ?

Yes, please and sorry! I only learned about the Cc: stable tag an hour
ago, I assumed Fixes: would work automatically.

I'll make sure to do at it for all future patches!

Thank you,

      René

> Helge
> 
>  ---
> >   drivers/video/fbdev/tcx.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > diff --git a/drivers/video/fbdev/tcx.c b/drivers/video/fbdev/tcx.c
> > index f9a0085ad72b..ca9e84e8d860 100644
> > --- a/drivers/video/fbdev/tcx.c
> > +++ b/drivers/video/fbdev/tcx.c
> > @@ -428,7 +428,7 @@ static int tcx_probe(struct platform_device *op)
> >   			j = i;
> >   			break;
> >   		}
> > -		par->mmap_map[i].poff = op->resource[j].start;
> > + par->mmap_map[i].poff = op->resource[j].start -
> > info->fix.smem_start;
> >   	}
> >     	info->fbops = &tcx_ops;
> 

-- 
René Rebe, ExactCODE GmbH, Berlin, Germany
https://exactco.de • https://t2linux.com • https://patreon.com/renerebe
```
