All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Lukasz Spintzyk <lukasz.spintzyk@displaylink.com>,
	dri-devel@lists.freedesktop.org, daniel.vetter@intel.com,
	gustavo@padovan.org, seanpaul@chromium.org, airlied@linux.ie,
	Deepak Singh Rawat <drawat@vmware.com>
Subject: Re: [PATCH 1/1] drm: Add dirty_rects atomic blob property for drm_plane
Date: Thu, 4 Jan 2018 16:30:45 +0100	[thread overview]
Message-ID: <ddb7c29e-7973-baef-5b8e-2d7edcb00cd9@shipmail.org> (raw)
In-Reply-To: <213d47ff-9cc2-5223-aad9-caa6ffbdc62a@displaylink.com>

Hi,

On 01/04/2018 02:52 PM, Lukasz Spintzyk wrote:
>
>
>
> On 28/12/2017 10:03, Thomas Hellstrom wrote:
>> Hi, Lukasz!
>>
>> (Sorry for top-posting).
>>
>> We have Deepak from our team working on the same subject. I think 
>> he's in over the holidays so I'll add him to the CC list.
> Great!
>>
>> Adding damage to the plane state is, IMO the correct way to do it. 
>> However, from your proposal it's not clear whether damage is given in 
>> the plane-, crtc- or framebuffer coordinates. The last conclusion 
>> from our email thread discussion was that they should be given in 
>> framebuffer coordinates with helpers to compute plane coordinates or 
>> crtc coordinates. The reason being that it's easier for user-space 
>> apps to send damage that way, and again, we have the full information 
>> that we can clip and scale if necessary. Most drivers probably want 
>> the damage in clipped plane- or crtc coordinates. Helpers could for 
>> example be in the form of region iterators.
> Personally i don't know the difference between plane rects and 
> framebuffer rects. I don't know what would be better. I was thinking 
> about coordinates of framebuffer that is attached to drm_plane_state.

A given point with coordinates (0, 0) in the plane coordinate system 
would have (state->crtc_x, state->crtc_y) in the crtc coordinate system 
and (state->src_x, state->src_y) in the framebuffer coordinate system.

So the question is, which is the suitable coordinate system, and where 
is the origin for the damage rects?

>>
>> Full (multi-rect) damage regions are OK with us, although we should 
>> keep in mind that we won't be able to compute region unions in the 
>> kernel (yet?). Implying: Should we forbid overlapping rects at the 
>> interface level or should we just recommend rects not to be 
>> overlapping? The former would be pretty hard to enforce efficiently.
> I would be for recommendation. We can add some helper functions to 
> combine rects and set some limits on number of rects to prevent abuse 
> of that interface.

I agree.

>>
>> Another thing we should think about is how to use this interface for 
>> the legacy "dirtyfb" call. Probably we need to clear the damage 
>> property on each state-update, or set a flag that "this is a dirtyfb 
>> state update".
>>
>> IMO we should also have as an end goal of this work to have 
>> gnome-shell on drm sending damage regions on page-flip, which means 
>> either porting gnome-shell to atomic or set up a new legacy 
>> page-flip-with-atomic ioctl.
> Can't we reuse dirtyfb ioctl for this purpose? It would be called 
> before page_flip ioctl?

No we can't. The dirtyfb ioctl causes an immediate repaint of the 
damaged region.

/Thomas

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

  reply	other threads:[~2018-01-04 15:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-02-07 22:44       ` Deepak Singh Rawat

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=ddb7c29e-7973-baef-5b8e-2d7edcb00cd9@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=drawat@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=lukasz.spintzyk@displaylink.com \
    --cc=seanpaul@chromium.org \
    /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.