<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/tiny/cirrus.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-09-21T17:41:04Z</updated>
<entry>
<title>drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers</title>
<updated>2023-09-21T17:41:04Z</updated>
<author>
<name>Douglas Anderson</name>
</author>
<published>2023-09-01T23:39:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce3d99c8349584bc0fbe1e21918a3ea1155343aa'/>
<id>urn:sha1:ce3d99c8349584bc0fbe1e21918a3ea1155343aa</id>
<content type='text'>
Based on grepping through the source code these drivers appear to be
missing a call to drm_atomic_helper_shutdown() at system shutdown
time. Among other things, this means that if a panel is in use that it
won't be cleanly powered off at system shutdown time.

The fact that we should call drm_atomic_helper_shutdown() in the case
of OS shutdown/restart comes straight out of the kernel doc "driver
instance overview" in drm_drv.c.

All of the drivers in this patch were fairly straightforward to fix
since they already had a call to drm_atomic_helper_shutdown() at
remove/unbind time but were just lacking one at system shutdown. The
only hitch is that some of these drivers use the component model to
register/unregister their DRM devices. The shutdown callback is part
of the original device. The typical solution here, based on how other
DRM drivers do this, is to keep track of whether the device is bound
based on drvdata. In most cases the drvdata is the drm_device, so we
can just make sure it is NULL when the device is not bound. In some
drivers, this required minor code changes. To make things simpler,
drm_atomic_helper_shutdown() has been modified to consider a NULL
drm_device as a noop in the patch ("drm/atomic-helper:
drm_atomic_helper_shutdown(NULL) should be a noop").

Suggested-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Tested-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Tested-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Reviewed-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Reviewed-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Tested-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid
</content>
</entry>
<entry>
<title>drm/cirrus: Use VGA macro constants to unblank</title>
<updated>2023-03-13T09:37:09Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8d221dd97cf054740017db9189029463c434a9f'/>
<id>urn:sha1:f8d221dd97cf054740017db9189029463c434a9f</id>
<content type='text'>
Set the VGA bit for unblanking with macro constants instead of magic
values. No functional changes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-18-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Store HW format/pitch in primary-plane state</title>
<updated>2023-03-13T09:37:05Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de7d09ffd5e74e3e1257944b3dd03357390b745a'/>
<id>urn:sha1:de7d09ffd5e74e3e1257944b3dd03357390b745a</id>
<content type='text'>
The hardware settings for color format and pitch are state of the
primary plane. Store the values in the primary plane's state structure
struct cirrus_primary_plane_state. Adapt all callers.

All fields in struct cirrus_device are now considered immutable after
initialization. Plane updates consider the difference between the old
and the new plane state before updating format or pitch.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-17-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Introduce struct cirrus_primary_plane_state</title>
<updated>2023-03-13T09:37:02Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74b9a444baca40998d4b3c193b0a98b495fdb7de'/>
<id>urn:sha1:74b9a444baca40998d4b3c193b0a98b495fdb7de</id>
<content type='text'>
The cirrus driver maintains plane state, format and pitch, in it's
device structure. Introduce a plane state for the primary plane to
store the values.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-16-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Inline cirrus_check_size() into primary-plane atomic_check</title>
<updated>2023-03-13T09:36:59Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ffdf8865dc52e33b9867fe745f681175b997209'/>
<id>urn:sha1:6ffdf8865dc52e33b9867fe745f681175b997209</id>
<content type='text'>
Inline the framebuffer size check into the primary plane's atomic_check
cirrus_primary_plane_atomic_check(). No functional changes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-15-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Test mode against video-memory size in device-wide mode_valid</title>
<updated>2023-03-13T09:36:55Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8ad33797ab3dd3ea011c1d5f52ec684fe925271'/>
<id>urn:sha1:f8ad33797ab3dd3ea011c1d5f52ec684fe925271</id>
<content type='text'>
Test a display mode against the available amount of video memory in
struct drm_mode_config_funcs.mode_valid, which cirrus implements in
cirrus_mode_config_mode_valid(). This helper tests display modes against
device-wide limits. Remove the now-obsolete per-CRTC test.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-14-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Remove size test from cirrus_fb_create()</title>
<updated>2023-03-13T09:36:40Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edc9f16763543e5f51f07164766fac8d6bc9e560'/>
<id>urn:sha1:edc9f16763543e5f51f07164766fac8d6bc9e560</id>
<content type='text'>
The DRM core implements a size check against the mode config's
limits when creating a framebuffer. [1] Remove the unnecessary
test from cirrus_fb_create() and remove the now-empty function.
Create framebuffers with drm_gem_fb_create_with_dirty().

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_framebuffer.c#L287 # [1]
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-13-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Remove format test from cirrus_fb_create()</title>
<updated>2023-03-13T09:36:32Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91affdf3517e9255443dfadaf6978ffec16f859a'/>
<id>urn:sha1:91affdf3517e9255443dfadaf6978ffec16f859a</id>
<content type='text'>
The DRM core implements a format check when setting a framebuffer
for a plane. [1] Remove the unnecessary test from cirrus_fb_create().

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_atomic.c#L629 # [1]
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-12-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Inline cirrus_fb_blit_rect()</title>
<updated>2023-03-13T09:36:28Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c94aa5e0407e23b9d51bcfd073d83d0e504705c3'/>
<id>urn:sha1:c94aa5e0407e23b9d51bcfd073d83d0e504705c3</id>
<content type='text'>
Inline cirrus_fb_blit_rect into its only caller. While at it, update
the code to use IOSYS_MAP_INIT_OFFSET(), which is the ideomatic way
of initializing struct iosys_map with an offset.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-11-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/cirrus: Enable damage clipping on primary plane</title>
<updated>2023-03-13T09:36:24Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-02-15T16:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03e7ac67e743195633455d7ecb4f7327e3797986'/>
<id>urn:sha1:03e7ac67e743195633455d7ecb4f7327e3797986</id>
<content type='text'>
Enable damage clipping on the primary plane and iterate over small
areas of reported framebuffer damage. Avoid the overhead of permanent
full-screen updates that cirrus currently implements.

This problem is indicated by the warning

  drm_plane_enable_fb_damage_clips() not called

in the kernel's log. Without damage clipping, drivers do full updates
of the screen area. This is costly as many screen updates, such as
cursor movement or command-line input, only change a small portion
of the output. Damage clipping allows renderers to inform drivers about
the changed areas.

With the damage information known, cirrus now iterates over a list of
change areas and only flushes those to the hardware's scanout buffer.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-10-tzimmermann@suse.de
</content>
</entry>
</feed>
