Skip to contentSkip to conversation

Inline rotation support in dpu driver

RFC Kalyan Thota 3 participants 4 messages Jul 3, 2021 – Jul 4, 2021 Arm Qualcomm mailing list

lore
Share & tools
lore
#0 lore raw

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(-)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines · Kalyan Thota

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

Quoted 7 lines

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

Quoted 14 lines

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

#2 lore raw
In reply to Kalyan Thota
Quoted 6 lines · Kalyan Thota

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.

Quoted 22 lines

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(-)
Signature · 2 lines
With best wishes
Dmitry
#3 lore raw
Quoted 10 lines · Dmitry Baryshkov
Quoted 6 lines · Kalyan Thota

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

Quoted 27 lines
Quoted 13 lines

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.

Quoted 9 lines

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