From: Helge Deller <deller@gmx.de>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: Shixiong Ou <oushixiong@kylinos.cn>,
Chintan Patel <chintanlike@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] fbdev: sh_mobile_lcdcfb: Restore the per-overlay sysfs attributes
Date: Sat, 12 Sep 2026 18:11:56 +0200 [thread overview]
Message-ID: <12560087-a0e2-4abb-a283-5bbf93b65e89@gmx.de> (raw)
In-Reply-To: <20260912102152.86744-1-kmehltretter@gmail.com>
On 9/12/26 12:21, Karl Mehltretter wrote:
> The ovl_* files documented in
> Documentation/ABI/testing/sysfs-devices-platform-sh_mobile_lcdc_fb no
> longer exist.
>
> Commit a979182a2453 ("fbdev: lcdcfb: Register sysfs groups through driver
> core") moved the attributes from each overlay's framebuffer device to
> the platform driver's dev_groups and renamed them overlay_*. There is
> now only one set of attributes for the whole LCDC. The callbacks still
> expect dev_get_drvdata() to return a struct fb_info, but the platform
> device holds struct sh_mobile_lcdc_priv, so they access the wrong
> structure.
>
> Restore the documented names and register the group on each overlay's
> framebuffer device with device_add_groups(). Remove it with
> device_remove_groups() before unregistering the framebuffer. Skip
> creation when dev_of_fbinfo(info) is NULL, as the old device_create_file()
> calls did.
>
> Drop the CONFIG_FB_DEVICE guard, since the driver already depends on it.
>
> Fixes: a979182a2453 ("fbdev: lcdcfb: Register sysfs groups through driver core")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
> Changes in v2:
> - Use dev_of_fbinfo() for overlay sysfs registration and removal (Helge).
>
> v1: https://lore.kernel.org/r/20260907021844.25497-1-kmehltretter@gmail.com/
>
> Found while reviewing the sysfs ABI documentation. Shixiong confirmed
> that using the platform driver's dev_groups is wrong here.
>
> Compile-tested with Clang 22.1.8, ARCH=arm and W=1, using multi_v7_defconfig
> with COMPILE_TEST=y, FB_DEVICE=y and FB_SH_MOBILE_LCDC=m.
>
> Also checked FB_DEVICE=n: olddefconfig disables FB_SH_MOBILE_LCDC because
> of its existing Kconfig dependency, and the framebuffer core compiles.
> This does not test the driver with FB_DEVICE=n; removing that dependency
> requires additional changes outside the overlay sysfs paths.
>
> No runtime test; I have no SH-Mobile hardware.
>
> drivers/video/fbdev/sh_mobile_lcdcfb.c | 39 +++++++++++++++++---------
> 1 file changed, 25 insertions(+), 14 deletions(-)
applied.
Thanks!
Helge
next prev parent reply other threads:[~2026-09-12 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 10:21 [PATCH v2] fbdev: sh_mobile_lcdcfb: Restore the per-overlay sysfs attributes Karl Mehltretter
2026-09-12 16:11 ` Helge Deller [this message]
2026-09-13 21:08 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12560087-a0e2-4abb-a283-5bbf93b65e89@gmx.de \
--to=deller@gmx.de \
--cc=chintanlike@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kmehltretter@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=oushixiong@kylinos.cn \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.