linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Inline rotation support in dpu driver
@ 2021-07-03 11:32 Kalyan Thota
  2021-07-03 18:26 ` Rob Clark
  2021-07-04  8:25 ` Dmitry Baryshkov
  0 siblings, 2 replies; 4+ messages in thread
From: Kalyan Thota @ 2021-07-03 11:32 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, devicetree
  Cc: Kalyan Thota, linux-kernel, robdclark, dianders, mkrishn

This change adds support for inline rotation in the dpu driver.
When inline rotation is enabled the VIG pipes will directly fetch the image
from memory in a rotated fashion

Inline rotation has following restrictions 
1) Supported only with compressed formats
2) max pre rotated height is 1088
3) restrictions with downscaling ratio

Queries: 

1) Since inline rotation works for fewer pixel formats with specific modifier, how can we provide this information to the compositor so that
chrome compositor can choose between overlaying or falling back to GPU. In the patch it fails in the atomic check.

2) If a display composition fails in atomic check due to any of the restrictions in overlays
can chrome compositor switch it back to the GPU and re trigger the commit ?

posting it as RFC as validation is not complete, please share early comments on this.

Kalyan Thota (1):
  drm/msm/disp/dpu1: add support for inline rotation in dpu driver

 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 47 +++++++++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 20 ++++++
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 93 ++++++++++++++++++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h      |  2 +
 4 files changed, 128 insertions(+), 34 deletions(-)

-- 
2.7.4


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

* Re: [RFC] Inline rotation support in dpu driver
  2021-07-03 11:32 [RFC] Inline rotation support in dpu driver Kalyan Thota
@ 2021-07-03 18:26 ` Rob Clark
  2021-07-04  8:25 ` Dmitry Baryshkov
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Clark @ 2021-07-03 18:26 UTC (permalink / raw)
  To: Kalyan Thota
  Cc: dri-devel, linux-arm-msm, freedreno,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, Douglas Anderson, Krishna Manikandan

On Sat, Jul 3, 2021 at 4:32 AM Kalyan Thota <kalyan_t@codeaurora.org> wrote:
>
> This change adds support for inline rotation in the dpu driver.
> When inline rotation is enabled the VIG pipes will directly fetch the image
> from memory in a rotated fashion
>
> Inline rotation has following restrictions
> 1) Supported only with compressed formats
> 2) max pre rotated height is 1088
> 3) restrictions with downscaling ratio
>
> Queries:
>
> 1) Since inline rotation works for fewer pixel formats with specific modifier, how can we provide this information to the compositor so that
> chrome compositor can choose between overlaying or falling back to GPU. In the patch it fails in the atomic check.
>
> 2) If a display composition fails in atomic check due to any of the restrictions in overlays
> can chrome compositor switch it back to the GPU and re trigger the commit ?

The correct way to provide this information to userspace is for the
atomic test step to fail.  Admittedly the CrOS compositor makes some
invalid assumptions that if a given state was valid in the past, it
will be valid in the future.  But I don't see height/format/downscale
restrictions as a thing that would change from frame to frame.

BR,
-R

> posting it as RFC as validation is not complete, please share early comments on this.
>
> Kalyan Thota (1):
>   drm/msm/disp/dpu1: add support for inline rotation in dpu driver
>
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 47 +++++++++----
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 20 ++++++
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 93 ++++++++++++++++++++------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h      |  2 +
>  4 files changed, 128 insertions(+), 34 deletions(-)
>
> --
> 2.7.4
>

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

* Re: [RFC] Inline rotation support in dpu driver
  2021-07-03 11:32 [RFC] Inline rotation support in dpu driver Kalyan Thota
  2021-07-03 18:26 ` Rob Clark
@ 2021-07-04  8:25 ` Dmitry Baryshkov
  2021-07-04 18:17   ` Rob Clark
  1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2021-07-04  8:25 UTC (permalink / raw)
  To: Kalyan Thota, dri-devel, linux-arm-msm, freedreno, devicetree
  Cc: linux-kernel, robdclark, dianders, mkrishn

On 03/07/2021 14:32, Kalyan Thota wrote:
> This change adds support for inline rotation in the dpu driver.
> When inline rotation is enabled the VIG pipes will directly fetch the image
> from memory in a rotated fashion
> 
> Inline rotation has following restrictions
> 1) Supported only with compressed formats

NV12, which is the only format you declare, is not compressed.

> 2) max pre rotated height is 1088
> 3) restrictions with downscaling ratio
> 
> Queries:
> 
> 1) Since inline rotation works for fewer pixel formats with specific modifier, how can we provide this information to the compositor so that
> chrome compositor can choose between overlaying or falling back to GPU. In the patch it fails in the atomic check.
> 
> 2) If a display composition fails in atomic check due to any of the restrictions in overlays
> can chrome compositor switch it back to the GPU and re trigger the commit ?
> 
> posting it as RFC as validation is not complete, please share early comments on this.
> 
> Kalyan Thota (1):
>    drm/msm/disp/dpu1: add support for inline rotation in dpu driver
> 
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 47 +++++++++----
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 20 ++++++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 93 ++++++++++++++++++++------
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h      |  2 +
>   4 files changed, 128 insertions(+), 34 deletions(-)
> 


-- 
With best wishes
Dmitry

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

* Re: [RFC] Inline rotation support in dpu driver
  2021-07-04  8:25 ` Dmitry Baryshkov
@ 2021-07-04 18:17   ` Rob Clark
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Clark @ 2021-07-04 18:17 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Kalyan Thota, dri-devel, linux-arm-msm, freedreno,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, Douglas Anderson, Krishna Manikandan

On Sun, Jul 4, 2021 at 1:25 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On 03/07/2021 14:32, Kalyan Thota wrote:
> > This change adds support for inline rotation in the dpu driver.
> > When inline rotation is enabled the VIG pipes will directly fetch the image
> > from memory in a rotated fashion
> >
> > Inline rotation has following restrictions
> > 1) Supported only with compressed formats
>
> NV12, which is the only format you declare, is not compressed.

nv12 can be used with the UBWC modifier, fwiw.. we use this in CrOS,
albeit with a hack on the v4l2 side to work around lack of modifier
support in v4l2

BR,
-R

> > 2) max pre rotated height is 1088
> > 3) restrictions with downscaling ratio
> >
> > Queries:
> >
> > 1) Since inline rotation works for fewer pixel formats with specific modifier, how can we provide this information to the compositor so that
> > chrome compositor can choose between overlaying or falling back to GPU. In the patch it fails in the atomic check.
> >
> > 2) If a display composition fails in atomic check due to any of the restrictions in overlays
> > can chrome compositor switch it back to the GPU and re trigger the commit ?
> >
> > posting it as RFC as validation is not complete, please share early comments on this.
> >
> > Kalyan Thota (1):
> >    drm/msm/disp/dpu1: add support for inline rotation in dpu driver
> >
> >   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 47 +++++++++----
> >   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 20 ++++++
> >   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 93 ++++++++++++++++++++------
> >   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h      |  2 +
> >   4 files changed, 128 insertions(+), 34 deletions(-)
> >
>
>
> --
> With best wishes
> Dmitry

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

end of thread, other threads:[~2021-07-04 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-03 11:32 [RFC] Inline rotation support in dpu driver Kalyan Thota
2021-07-03 18:26 ` Rob Clark
2021-07-04  8:25 ` Dmitry Baryshkov
2021-07-04 18:17   ` Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).