All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Damage rectangles interface for DRM
@ 2017-12-21 11:10 Lukasz Spintzyk
  2017-12-21 11:10 ` [PATCH 1/1] drm: Add dirty_rects atomic blob property for drm_plane Lukasz Spintzyk
  0 siblings, 1 reply; 16+ messages in thread
From: Lukasz Spintzyk @ 2017-12-21 11:10 UTC (permalink / raw)
  To: dri-devel, daniel.vetter, gustavo, seanpaul, airlied; +Cc: Lukasz Spintzyk

	This is a draft of damage interface for drm. Alluding to the topic "RFC: page-flip with damage?" on dri-devel
https://lists.freedesktop.org/archives/dri-devel/2017-September/153235.html
The following patch is a proof of concept, how we can deliver dirty rectangles to the drm drivers.
Patch was tested on Chromium OS to deliver damage regions to atomic version of evdi driver. Hence this supports atomic drivers for now.
We should agree on the approach how this can be implemented.
In the patch, I intend to use drm blob properties to pass c-style array of drm_clip_rects.
Is DRM properties framework suitable for this solution? The only doubt I have is that it requires to create and destroy property blob every atomic_commit/page flip as this is the only way to update blob with damage regions. This is associated with kmalloc and free for each flip. Do you think if this approach relates to some performance risk?

	The proposed solution is attaching DIRTY_RECTS property to the drm_plane. The property means to hold list of rectangles in plane coordinates.
This is opposite to initial plan in thread from September 2017. I wanted to present our rationale for this.
Single rect vs rect list:
	Some compositors like Chromium can have quite precise damage information that would be lost if we would collapse them. 
Damage rectangles on crtc vs per plane
 	The property is attached to drm plane initially. We had a talk with guys from Chromium compositor. The plan is to use overlay planes more extensively. Also, Chromium compositor operates on dirty rects per plane so it would be easier to use them as is.
In my opinion this is more natural to deliver information about damage per plane. Damage information is used primarily for bandwidth savings. For driver that deliver plane data it is more useful to know what parts of the plane have changed so it can send only these memory areas.
I don't know if this reasoning is valid. Probably it depends on hardware and driver.
I can speak about use cases I have faced. One of them is additional cursor plane. With damage regions on crtc I don't know if it is related to primary plane, or it is connected to cursor movement. Also, user space applications must generate additional damage regions when such cursor plane is moving over primary plane. For such cases passing dirty rectangles for planes seems to be more straightforward.

This is draft with minimal functionality. I would like to hear what is your opinion on it.  
I am happy to hear what are the requirements of other driver vendors.


Thanks
Lukasz Spintzyk

Lukasz Spintzyk (1):
  drm: Add dirty_rects atomic blob property for drm_plane

 drivers/gpu/drm/drm_atomic.c      | 10 ++++++++++
 drivers/gpu/drm/drm_mode_config.c |  6 ++++++
 drivers/gpu/drm/drm_plane.c       |  1 +
 include/drm/drm_mode_config.h     |  5 +++++
 include/drm/drm_plane.h           |  3 +++
 5 files changed, 25 insertions(+)

-- 
2.15.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-03-06  7:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-21 11:10 [PATCH 0/1] Damage rectangles interface for DRM Lukasz Spintzyk
2017-12-21 11:10 ` [PATCH 1/1] drm: Add dirty_rects atomic blob property for drm_plane Lukasz Spintzyk
2017-12-21 12:46   ` Ville Syrjälä
2017-12-21 13:10     ` Daniel Vetter
2017-12-22 11:44       ` Lukasz Spintzyk
2018-02-28 21:10       ` Deepak Singh Rawat
2018-03-05  8:37         ` Daniel Vetter
2018-03-05  9:22           ` Thomas Hellstrom
2018-03-05  9:39             ` Daniel Vetter
2018-03-05 10:01               ` Thomas Hellstrom
2018-03-06  7:08                 ` Daniel Vetter
2018-03-06  7:25                   ` Thomas Hellstrom
2017-12-28  9:03   ` Thomas Hellstrom
2018-01-04 13:52     ` Lukasz Spintzyk
2018-01-04 15:30       ` Thomas Hellstrom
2018-02-07 22:44       ` Deepak Singh Rawat

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.