<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/sysfb, branch v6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-06-27T14:00:49Z</updated>
<entry>
<title>drm/vesadrm: Avoid NULL-ptr deref in vesadrm_pmi_cmap_write()</title>
<updated>2025-06-27T14:00:49Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-06-17T14:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=615cc4223fcbe1e0e6f68b8494b26bb6c08d917a'/>
<id>urn:sha1:615cc4223fcbe1e0e6f68b8494b26bb6c08d917a</id>
<content type='text'>
Only set PMI fields if the screen_info's Vesa PM segment has been
set. Vesa PMI is the power-management interface. It also provides
means to set the color palette. The interface is optional, so not
all VESA graphics cards support it. Print vesafb's warning [1] if
the hardware palette cannot be set at all.

If unsupported the field PrimaryPalette in struct vesadrm.pmi is
NULL, which results in a segmentation fault. Happens with qemu's
Cirrus emulation.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 814d270b31d2 ("drm/sysfb: vesadrm: Add gamma correction")
Link: https://elixir.bootlin.com/linux/v6.15/source/drivers/video/fbdev/vesafb.c#L375 # 1
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: dri-devel@lists.freedesktop.org
Acked-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250617140944.142392-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: Share helpers for screen_info validation</title>
<updated>2025-04-14T08:16:14Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T08:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8c086880b2bac0ebc931b635b3b10bdc5ec6496'/>
<id>urn:sha1:e8c086880b2bac0ebc931b635b3b10bdc5ec6496</id>
<content type='text'>
Share efidrm's and vesadrm's validation of struct screen_info in
shared helpers. Update the drivers.

Most validation helpers test individual values against limits and
can be shared as they are. For color formats, a common helper looks
up the correct DRM format info from a driver-provided list of color
formats.

These screen_info helpers are only available if CONFIG_SCREEN_INFO
has been selected, as done by efidrm and vesadrm.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250410083834.10810-4-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: Share helpers for integer validation</title>
<updated>2025-04-14T08:16:13Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T08:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6046b49bafff47726a377ef05dc55ef7dec01cbd'/>
<id>urn:sha1:6046b49bafff47726a377ef05dc55ef7dec01cbd</id>
<content type='text'>
Provide sysfb helpers for validating framebuffer integer values
against limits. Update drivers. If a driver did not specify a limit
for a certain value, use INT_MAX.

v2:
- declare module information near EOF (Javier)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250410083834.10810-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: Split source file</title>
<updated>2025-04-14T08:16:12Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T08:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=314c45e39e9abcaf2fe5449a11b6d9ad3b2c7dbc'/>
<id>urn:sha1:314c45e39e9abcaf2fe5449a11b6d9ad3b2c7dbc</id>
<content type='text'>
Split drm_sysfb_helper.c into two source files. There's now one
source file for the mode-setting pipeline and one source file for
module meta data. Prepares for adding additional source code to
sysfb helpers.

v2:
- fix typo in commit message (Javier)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250410083834.10810-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: efidrm: Avoid clang -Wsometimes-uninitialized in efidrm_device_create()</title>
<updated>2025-04-11T13:28:59Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2025-04-10T17:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=746375524bb6a93bc3ef7a3c2e8c916bfdfcb0b2'/>
<id>urn:sha1:746375524bb6a93bc3ef7a3c2e8c916bfdfcb0b2</id>
<content type='text'>
Clang warns (or errors with CONFIG_WERROR=y):

  drivers/gpu/drm/sysfb/efidrm.c:353:11: error: variable 'screen_base' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    353 |         else if (mem_flags &amp; EFI_MEMORY_WB)
        |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
  drivers/gpu/drm/sysfb/efidrm.c:356:7: note: uninitialized use occurs here
    356 |         if (!screen_base)
        |              ^~~~~~~~~~~
  drivers/gpu/drm/sysfb/efidrm.c:353:7: note: remove the 'if' if its condition is always true
    353 |         else if (mem_flags &amp; EFI_MEMORY_WB)
        |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    354 |                 screen_base = devm_memremap(&amp;pdev-&gt;dev, mem-&gt;start, resource_size(mem),
  drivers/gpu/drm/sysfb/efidrm.c:261:27: note: initialize the variable 'screen_base' to silence this warning
    261 |         void __iomem *screen_base;
        |                                  ^
        |                                   = NULL

efidrm_get_mem_flags() can only return a mask that has at least one of
the tested values set so the else case is impossible but clang's static
analysis runs before inlining so it cannot know that.

Initialize screen_base to NULL and add a defensive error message in case
mem_flags were ever returned without one of the four valid values.

Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays")
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://lore.kernel.org/r/20250410-efidrm-avoid-uninit-screen_info-warning-v2-1-b79646f58c24@kernel.org
</content>
</entry>
<entry>
<title>drm/sysfb: efidrm: Support module builds</title>
<updated>2025-04-09T07:03:15Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-08T09:17:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8bf4a1bdaeadb28d13b9a2bcfd5910fda06eede'/>
<id>urn:sha1:e8bf4a1bdaeadb28d13b9a2bcfd5910fda06eede</id>
<content type='text'>
Make CONFIG_DRM_EFIDRM a tristate to enable module builds.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250408091837.407401-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: simpledrm: Remove unused helper simpledrm_device_of_dev()</title>
<updated>2025-04-08T07:11:41Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-07T13:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9a96a0be905037245d58668c41c3c4b015578b6'/>
<id>urn:sha1:b9a96a0be905037245d58668c41c3c4b015578b6</id>
<content type='text'>
After moving most of the mode-setting pipeline into drm_sysfb_helper.c,
simpledrm_device_of_dev() is no longer being used. Remove it.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reported-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Closes: https://lore.kernel.org/dri-devel/20250407131344.139878-1-jfalempe@redhat.com/
Fixes: 177dfbdb7e67 ("drm/sysfb: Merge primary-plane functions")
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250407134753.985925-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/simpledrm: Do not upcast in release helpers</title>
<updated>2025-04-08T07:11:40Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-07T13:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d231cde7c84359fb18fb268cf6cff03b5bce48ff'/>
<id>urn:sha1:d231cde7c84359fb18fb268cf6cff03b5bce48ff</id>
<content type='text'>
The res pointer passed to simpledrm_device_release_clocks() and
simpledrm_device_release_regulators() points to an instance of
struct simpledrm_device. No need to upcast from struct drm_device.
The upcast is harmless, as DRM device is the first field in struct
simpledrm_device.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
Cc: &lt;stable@vger.kernel.org&gt; # v5.14+
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250407134753.985925-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: vesadrm: Add gamma correction</title>
<updated>2025-04-07T09:02:07Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-01T09:37:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=814d270b31d27b6ea4f722b8ae2db9802fe332ff'/>
<id>urn:sha1:814d270b31d27b6ea4f722b8ae2db9802fe332ff</id>
<content type='text'>
Add palette support and export GAMMA properties via sysfs. User-space
compositors can use this interface for programming gamma ramps or night
mode.

Vesadrm supports palette updates via VGA DAC registers or VESA palette
calls. Up to 256 palette entries are available. Userspace always supplies
gamma ramps of 256 entries. If the native color format does not match
this because pixel component have less then 8 bits, vesadrm interpolates
among the palette entries.

The code uses CamelCase style in a few places to match the VESA manuals.

v3:
- fix coding style
v2:
- use CONFIG_X86_32 instead of __i386__ (checkpatch)
- protect struct vesadrm.pmi with CONFIG_X86_32

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250401094056.32904-19-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/sysfb: vesadrm: Add EDID support</title>
<updated>2025-04-07T09:02:07Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-01T09:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d0de9e8b7087745e63eef7bee298e103da4f590'/>
<id>urn:sha1:9d0de9e8b7087745e63eef7bee298e103da4f590</id>
<content type='text'>
Enable the connector's EDID property if edid_info contains valid
data. Exports the EDID via sysfs for user-space compositors.

EDID information is not always available. Depending on the system
and kernel configuration, it is either provided by the boot loader
or read by the kernel during early boot stages.

There's only one VESA display, so EDID data always belongs to this
output.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20250401094056.32904-18-tzimmermann@suse.de
</content>
</entry>
</feed>
