diff mbox

[v5,1/5] drm: add generic zpos property

Message ID CA+M3ks4cg3T_q9Ug1_Uc4yrZKsK97rK+QA0FijDUnUKCMkpcAg@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Benjamin Gaignard April 1, 2016, 12:48 p.m. UTC
This patch adds support for generic plane's zpos property property with
well-defined semantics:
- added zpos properties to plane and plane state structures
- added helpers for normalizing zpos properties of given set of planes
- well defined semantics: planes are sorted by zpos values and then plane
  id value if zpos equals

Normalized zpos values are calculated automatically when generic
muttable zpos property has been initialized. Drivers can simply use
plane_state->normalized_zpos in their atomic_check and/or plane_update
callbacks without any additional calls to DRM core.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Compare to Marek's original patch zpos property is now specific to each
plane and no more to the core.
Normalize function take care of the range of per plane defined range
before set normalized_zpos.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
 Documentation/DocBook/gpu.tmpl      |  10 ++
 drivers/gpu/drm/Makefile            |   2 +-
 drivers/gpu/drm/drm_atomic_helper.c |   6 +
 drivers/gpu/drm/drm_blend.c         | 283 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h |   3 +
 include/drm/drm_crtc.h              |  25 ++++
 6 files changed, 328 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/drm_blend.c

Comments

Benjamin Gaignard May 9, 2016, 8:42 a.m. UTC | #1
Hello,

I little up in this topic.
If generic z-order patches can't land into drm core,
I wille have to resend the patch to enable it within STI driver:
https://lists.freedesktop.org/archives/dri-devel/2016-January/098140.html

Regards,
Benjamin

2016-04-01 14:48 GMT+02:00 Benjamin Gaignard <benjamin.gaignard@linaro.org>:
> This patch adds support for generic plane's zpos property property with
> well-defined semantics:
> - added zpos properties to plane and plane state structures
> - added helpers for normalizing zpos properties of given set of planes
> - well defined semantics: planes are sorted by zpos values and then plane
>   id value if zpos equals
>
> Normalized zpos values are calculated automatically when generic
> muttable zpos property has been initialized. Drivers can simply use
> plane_state->normalized_zpos in their atomic_check and/or plane_update
> callbacks without any additional calls to DRM core.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>
> Compare to Marek's original patch zpos property is now specific to each
> plane and no more to the core.
> Normalize function take care of the range of per plane defined range
> before set normalized_zpos.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> ---
>  Documentation/DocBook/gpu.tmpl      |  10 ++
>  drivers/gpu/drm/Makefile            |   2 +-
>  drivers/gpu/drm/drm_atomic_helper.c |   6 +
>  drivers/gpu/drm/drm_blend.c         | 283 ++++++++++++++++++++++++++++++++++++
>  drivers/gpu/drm/drm_crtc_internal.h |   3 +
>  include/drm/drm_crtc.h              |  25 ++++
>  6 files changed, 328 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/drm_blend.c
>
> diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl
> index 1692c4d..b7a5161 100644
> --- a/Documentation/DocBook/gpu.tmpl
> +++ b/Documentation/DocBook/gpu.tmpl
> @@ -2147,6 +2147,16 @@ void intel_crt_init(struct drm_device *dev)
>   the underlying hardware).</td>
>   </tr>
>   <tr>
> + <td valign="top" > "zpos" </td>
> + <td valign="top" >RANGE</td>
> + <td valign="top" >Min= driver dependent, Max= driver dependent</td>
> + <td valign="top" >Plane</td>
> + <td valign="top" >Plane's 'z' position during blending operation (0
> for background, highest for frontmost).
> + If two planes assigned to same CRTC have equal zpos values, the
> plane with higher plane
> + id is treated as closer to front. Can be IMMUTABLE if driver doesn't
> support changing
> + planes' order. Exact value range is driver dependent.</td>
> + </tr>
> + <tr>
>   <td rowspan="20" valign="top" >i915</td>
>   <td rowspan="2" valign="top" >Generic</td>
>   <td valign="top" >"Broadcast RGB"</td>
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 6eb94fc..18dc563 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for the drm device driver.  This driver provides support for the
Daniel Vetter May 9, 2016, 9:05 a.m. UTC | #2
On Mon, May 09, 2016 at 10:42:45AM +0200, Benjamin Gaignard wrote:
> Hello,
> 
> I little up in this topic.
> If generic z-order patches can't land into drm core,
> I wille have to resend the patch to enable it within STI driver:
> https://lists.freedesktop.org/archives/dri-devel/2016-January/098140.html

It's the patch author's duty to ping folks for reviews to move a patch
forward. That doesn't happen automatically.

It helps though if you cc everyone who commented on earlier iterations (I
prefer Cc: lines in the commit message). Ville seems to have not been
added for this one here.

Also there's a metric pile of driver patches that floated around to
convert them over to core zpos. Can you pls pick those up too?

I definitely want to land this in drm core, so not going to take a
ragequite-I'll-do-it-in-my-driver for an answer ;-)

Thanks, Daniel

> 
> Regards,
> Benjamin
> 
> 2016-04-01 14:48 GMT+02:00 Benjamin Gaignard <benjamin.gaignard@linaro.org>:
> > This patch adds support for generic plane's zpos property property with
> > well-defined semantics:
> > - added zpos properties to plane and plane state structures
> > - added helpers for normalizing zpos properties of given set of planes
> > - well defined semantics: planes are sorted by zpos values and then plane
> >   id value if zpos equals
> >
> > Normalized zpos values are calculated automatically when generic
> > muttable zpos property has been initialized. Drivers can simply use
> > plane_state->normalized_zpos in their atomic_check and/or plane_update
> > callbacks without any additional calls to DRM core.
> >
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >
> > Compare to Marek's original patch zpos property is now specific to each
> > plane and no more to the core.
> > Normalize function take care of the range of per plane defined range
> > before set normalized_zpos.
> >
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> > ---
> >  Documentation/DocBook/gpu.tmpl      |  10 ++
> >  drivers/gpu/drm/Makefile            |   2 +-
> >  drivers/gpu/drm/drm_atomic_helper.c |   6 +
> >  drivers/gpu/drm/drm_blend.c         | 283 ++++++++++++++++++++++++++++++++++++
> >  drivers/gpu/drm/drm_crtc_internal.h |   3 +
> >  include/drm/drm_crtc.h              |  25 ++++
> >  6 files changed, 328 insertions(+), 1 deletion(-)
> >  create mode 100644 drivers/gpu/drm/drm_blend.c
> >
> > diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl
> > index 1692c4d..b7a5161 100644
> > --- a/Documentation/DocBook/gpu.tmpl
> > +++ b/Documentation/DocBook/gpu.tmpl
> > @@ -2147,6 +2147,16 @@ void intel_crt_init(struct drm_device *dev)
> >   the underlying hardware).</td>
> >   </tr>
> >   <tr>
> > + <td valign="top" > "zpos" </td>
> > + <td valign="top" >RANGE</td>
> > + <td valign="top" >Min= driver dependent, Max= driver dependent</td>
> > + <td valign="top" >Plane</td>
> > + <td valign="top" >Plane's 'z' position during blending operation (0
> > for background, highest for frontmost).
> > + If two planes assigned to same CRTC have equal zpos values, the
> > plane with higher plane
> > + id is treated as closer to front. Can be IMMUTABLE if driver doesn't
> > support changing
> > + planes' order. Exact value range is driver dependent.</td>
> > + </tr>
> > + <tr>
> >   <td rowspan="20" valign="top" >i915</td>
> >   <td rowspan="2" valign="top" >Generic</td>
> >   <td valign="top" >"Broadcast RGB"</td>
> > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> > index 6eb94fc..18dc563 100644
> > --- a/drivers/gpu/drm/Makefile
> > +++ b/drivers/gpu/drm/Makefile
> > @@ -2,7 +2,7 @@
> >  # Makefile for the drm device driver.  This driver provides support for the
> 
> 
> 
> -- 
> Benjamin Gaignard
> 
> Graphic Working Group
> 
> Linaro.org ? Open source software for ARM SoCs
> 
> Follow Linaro: Facebook | Twitter | Blog
Tobias Jakobi May 9, 2016, 10:21 a.m. UTC | #3
Hello,

just voicing my interest in having this feature in DRM core.

- Tobias


Daniel Vetter wrote:
> On Mon, May 09, 2016 at 10:42:45AM +0200, Benjamin Gaignard wrote:
>> Hello,
>>
>> I little up in this topic.
>> If generic z-order patches can't land into drm core,
>> I wille have to resend the patch to enable it within STI driver:
>> https://lists.freedesktop.org/archives/dri-devel/2016-January/098140.html
> 
> It's the patch author's duty to ping folks for reviews to move a patch
> forward. That doesn't happen automatically.
> 
> It helps though if you cc everyone who commented on earlier iterations (I
> prefer Cc: lines in the commit message). Ville seems to have not been
> added for this one here.
> 
> Also there's a metric pile of driver patches that floated around to
> convert them over to core zpos. Can you pls pick those up too?
> 
> I definitely want to land this in drm core, so not going to take a
> ragequite-I'll-do-it-in-my-driver for an answer ;-)
> 
> Thanks, Daniel
> 
>>
>> Regards,
>> Benjamin
>>
>> 2016-04-01 14:48 GMT+02:00 Benjamin Gaignard <benjamin.gaignard@linaro.org>:
>>> This patch adds support for generic plane's zpos property property with
>>> well-defined semantics:
>>> - added zpos properties to plane and plane state structures
>>> - added helpers for normalizing zpos properties of given set of planes
>>> - well defined semantics: planes are sorted by zpos values and then plane
>>>   id value if zpos equals
>>>
>>> Normalized zpos values are calculated automatically when generic
>>> muttable zpos property has been initialized. Drivers can simply use
>>> plane_state->normalized_zpos in their atomic_check and/or plane_update
>>> callbacks without any additional calls to DRM core.
>>>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>>
>>> Compare to Marek's original patch zpos property is now specific to each
>>> plane and no more to the core.
>>> Normalize function take care of the range of per plane defined range
>>> before set normalized_zpos.
>>>
>>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
>>> ---
>>>  Documentation/DocBook/gpu.tmpl      |  10 ++
>>>  drivers/gpu/drm/Makefile            |   2 +-
>>>  drivers/gpu/drm/drm_atomic_helper.c |   6 +
>>>  drivers/gpu/drm/drm_blend.c         | 283 ++++++++++++++++++++++++++++++++++++
>>>  drivers/gpu/drm/drm_crtc_internal.h |   3 +
>>>  include/drm/drm_crtc.h              |  25 ++++
>>>  6 files changed, 328 insertions(+), 1 deletion(-)
>>>  create mode 100644 drivers/gpu/drm/drm_blend.c
>>>
>>> diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl
>>> index 1692c4d..b7a5161 100644
>>> --- a/Documentation/DocBook/gpu.tmpl
>>> +++ b/Documentation/DocBook/gpu.tmpl
>>> @@ -2147,6 +2147,16 @@ void intel_crt_init(struct drm_device *dev)
>>>   the underlying hardware).</td>
>>>   </tr>
>>>   <tr>
>>> + <td valign="top" > "zpos" </td>
>>> + <td valign="top" >RANGE</td>
>>> + <td valign="top" >Min= driver dependent, Max= driver dependent</td>
>>> + <td valign="top" >Plane</td>
>>> + <td valign="top" >Plane's 'z' position during blending operation (0
>>> for background, highest for frontmost).
>>> + If two planes assigned to same CRTC have equal zpos values, the
>>> plane with higher plane
>>> + id is treated as closer to front. Can be IMMUTABLE if driver doesn't
>>> support changing
>>> + planes' order. Exact value range is driver dependent.</td>
>>> + </tr>
>>> + <tr>
>>>   <td rowspan="20" valign="top" >i915</td>
>>>   <td rowspan="2" valign="top" >Generic</td>
>>>   <td valign="top" >"Broadcast RGB"</td>
>>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>>> index 6eb94fc..18dc563 100644
>>> --- a/drivers/gpu/drm/Makefile
>>> +++ b/drivers/gpu/drm/Makefile
>>> @@ -2,7 +2,7 @@
>>>  # Makefile for the drm device driver.  This driver provides support for the
>>
>>
>>
>> -- 
>> Benjamin Gaignard
>>
>> Graphic Working Group
>>
>> Linaro.org ? Open source software for ARM SoCs
>>
>> Follow Linaro: Facebook | Twitter | Blog
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl
index 1692c4d..b7a5161 100644
--- a/Documentation/DocBook/gpu.tmpl
+++ b/Documentation/DocBook/gpu.tmpl
@@ -2147,6 +2147,16 @@  void intel_crt_init(struct drm_device *dev)
  the underlying hardware).</td>
  </tr>
  <tr>
+ <td valign="top" > "zpos" </td>
+ <td valign="top" >RANGE</td>
+ <td valign="top" >Min= driver dependent, Max= driver dependent</td>
+ <td valign="top" >Plane</td>
+ <td valign="top" >Plane's 'z' position during blending operation (0
for background, highest for frontmost).
+ If two planes assigned to same CRTC have equal zpos values, the
plane with higher plane
+ id is treated as closer to front. Can be IMMUTABLE if driver doesn't
support changing
+ planes' order. Exact value range is driver dependent.</td>
+ </tr>
+ <tr>
  <td rowspan="20" valign="top" >i915</td>
  <td rowspan="2" valign="top" >Generic</td>
  <td valign="top" >"Broadcast RGB"</td>
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 6eb94fc..18dc563 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -2,7 +2,7 @@ 
 # Makefile for the drm device driver.  This driver provides support for the
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html