Return from mtk_ovl_layer_config after mtk_ovl_layer_off
Subsystems (3)
PATCH 1/2 Return from mtk_ovl_layer_config after mtk_ovl_layer_off
drm/mediatek: return if plane pending state is disabled.
If the plane pending state is disabled, call mtk_ovl_layer_off then return.
This guarantees that that the state is valid for all operations when the pending state is enabled.
To: CK Hu <[email protected]>
To: [email protected]
--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +4 -3
@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,unsigned int src_size = (pending->height <<16 ) | pending->width;unsigned int con; -if (!pending->enable) +if (!pending->enable) {mtk_ovl_layer_off (comp, idx); +return ; + } con =ovl_fmt_convert (ovl, fmt);if (idx !=0 )
@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,writel_relaxed (offset, comp->regs +DISP_REG_OVL_OFFSET (idx));writel_relaxed (addr, comp->regs +DISP_REG_OVL_ADDR (ovl, idx)); -if (pending->enable) -mtk_ovl_layer_on (comp, idx); +mtk_ovl_layer_on (comp, idx); }static void mtk_ovl_bgclr_in_on (struct mtk_ddp_comp *comp)
Signature · 7 lines
2.24.0.525.g8f36a354ae-goog _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
PATCH 2/2 Turn off Alpha bit when plane format has no alpha
drm/mediatek: Add OVL_CON_ALPHA only when the plane format has_alpha.
This change enables XR24 format to be displayed as an overlay on top of the primary plane.
To: CK Hu <[email protected]>
To: [email protected]
--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1 -1
@@ -266,7 +266,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, } con =ovl_fmt_convert (ovl, fmt); -if (idx !=0 ) +if (state->base.fb->format->has_alpha) con |=OVL_CON_AEN |OVL_CON_ALPHA ;if (pending->rotation &DRM_MODE_REFLECT_Y ) {
Signature · 7 lines
2.24.0.525.g8f36a354ae-goog _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [PATCH 2/2] Turn off Alpha bit when plane format has no alpha
Hi, Mark:
Quoted 4 lines · Mark Yacoub
drm/mediatek: Add
OVL_CON_ALPHAonly when the plane formathas_alpha.This change enables XR24 format to be displayed as an overlay on top of the primary plane.
Quoted 21 lines
Suggested-by Sean Paul <[email protected]>To: CK Hu <[email protected]>
To: [email protected]Cc Daniele Castagna <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Mark Yacoub <[email protected]>--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +0
-0
drivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, · line 272
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1
-1@@ -266,7 +266,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, } con =ovl_fmt_convert (ovl, fmt); -if (idx !=0 ) +if (state->base.fb->format->has_alpha) con |=OVL_CON_AEN |OVL_CON_ALPHA ;if (pending->rotation &DRM_MODE_REFLECT_Y ) {
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi, Mark:
Quoted 6 lines · Mark Yacoub
drm/mediatek: return if plane pending state is disabled.
If the plane pending state is disabled, call
mtk_ovl_layer_offthen return.
This guarantees that that the state is valid for all operations when the pending state is enabled.
Quoted 33 lines
Suggested-by Sean Paul <[email protected]>To: CK Hu <[email protected]>
To: [email protected]Cc Daniele Castagna <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Mark Yacoub <[email protected]>--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +3
-1@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,unsigned int src_size = (pending->height <<16 ) | pending->width;unsigned int con; -if (!pending->enable) +if (!pending->enable) {mtk_ovl_layer_off (comp, idx); +return ; + } con =ovl_fmt_convert (ovl, fmt);if (idx !=0 )
drivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, · line 291
Quoted 9 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1
-2@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,writel_relaxed (offset, comp->regs +DISP_REG_OVL_OFFSET (idx));writel_relaxed (addr, comp->regs +DISP_REG_OVL_ADDR (ovl, idx)); -if (pending->enable) -mtk_ovl_layer_on (comp, idx); +mtk_ovl_layer_on (comp, idx); }static void mtk_ovl_bgclr_in_on (struct mtk_ddp_comp *comp)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sean Paul
Reviewed-byQuoted 4 lines · CK Hu
Hi, Mark:
On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote:
Quoted 9 lines
Quoted 6 lines
drm/mediatek: return if plane pending state is disabled.
If the plane pending state is disabled, call
mtk_ovl_layer_offthen return.
This guarantees that that the state is valid for all operations when the pending state is enabled.Reviewed-by CK Hu <[email protected]>
Thanks for reviewing these patches, CK. When you apply them to your tree, could you please fixup the subjects with the correct prefixes?
Both patches are also
Sean
Quoted 41 lines
Quoted 41 lines
Suggested-by Sean Paul <[email protected]>To: CK Hu <[email protected]>
To: [email protected]Cc Daniele Castagna <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Mark Yacoub <[email protected]>--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +4
-3@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,unsigned int src_size = (pending->height <<16 ) | pending->width;unsigned int con; -if (!pending->enable) +if (!pending->enable) {mtk_ovl_layer_off (comp, idx); +return ; + } con =ovl_fmt_convert (ovl, fmt);if (idx !=0 )@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,writel_relaxed (offset, comp->regs +DISP_REG_OVL_OFFSET (idx));writel_relaxed (addr, comp->regs +DISP_REG_OVL_ADDR (ovl, idx)); -if (pending->enable) -mtk_ovl_layer_on (comp, idx); +mtk_ovl_layer_on (comp, idx); }
Quoted 6 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, · line 291
Quoted 1 line
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +0
-0static void mtk_ovl_bgclr_in_on (struct mtk_ddp_comp *comp)_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi, Sean:
Quoted 12 lines · Sean Paul
Quoted 11 lines · CK Hu
Hi, Mark:
Quoted 6 lines · Mark Yacoub
drm/mediatek: return if plane pending state is disabled.
If the plane pending state is disabled, call
mtk_ovl_layer_offthen return.
This guarantees that that the state is valid for all operations when the pending state is enabled.
Quoted 5 lines
Quoted 2 lines
Reviewed-by CK Hu <[email protected]>Thanks for reviewing these patches, CK. When you apply them to your tree, could you please fixup the subjects with the correct prefixes?
Thanks for your notice. I've already planed to do so.
Regards,
CK
Quoted 55 lines
Both patches are also
Reviewed-by Sean Paul <[email protected]>Sean
Quoted 41 lines
Quoted 41 lines
Suggested-by Sean Paul <[email protected]>To: CK Hu <[email protected]>
To: [email protected]Cc Daniele Castagna <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Mark Yacoub <[email protected]>--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +4
-3@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,unsigned int src_size = (pending->height <<16 ) | pending->width;unsigned int con; -if (!pending->enable) +if (!pending->enable) {mtk_ovl_layer_off (comp, idx); +return ; + } con =ovl_fmt_convert (ovl, fmt);if (idx !=0 )@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,writel_relaxed (offset, comp->regs +DISP_REG_OVL_OFFSET (idx));writel_relaxed (addr, comp->regs +DISP_REG_OVL_ADDR (ovl, idx)); -if (pending->enable) -mtk_ovl_layer_on (comp, idx); +mtk_ovl_layer_on (comp, idx); }Quoted 6 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, · line 291
Quoted 1 line
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +0
-0static void mtk_ovl_bgclr_in_on (struct mtk_ddp_comp *comp)_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi, Mark:
Quoted 6 lines · Mark Yacoub
drm/mediatek: return if plane pending state is disabled.
If the plane pending state is disabled, call
mtk_ovl_layer_offthen return.
This guarantees that that the state is valid for all operations when the pending state is enabled.
For this series, applied to mediatek-drm-next-5.6 [1], thanks.
[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.6
Regards,
CK
Quoted 33 lines
Suggested-by Sean Paul <[email protected]>To: CK Hu <[email protected]>
To: [email protected]Cc Daniele Castagna <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Mark Yacoub <[email protected]>--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +3
-1@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,unsigned int src_size = (pending->height <<16 ) | pending->width;unsigned int con; -if (!pending->enable) +if (!pending->enable) {mtk_ovl_layer_off (comp, idx); +return ; + } con =ovl_fmt_convert (ovl, fmt);if (idx !=0 )
drivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, · line 291
Quoted 9 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1
-2@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,writel_relaxed (offset, comp->regs +DISP_REG_OVL_OFFSET (idx));writel_relaxed (addr, comp->regs +DISP_REG_OVL_ADDR (ovl, idx)); -if (pending->enable) -mtk_ovl_layer_on (comp, idx); +mtk_ovl_layer_on (comp, idx); }static void mtk_ovl_bgclr_in_on (struct mtk_ddp_comp *comp)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thanks for the update!
Quoted 51 lines · CK Hu
Hi, Mark:
Quoted 6 lines · Mark Yacoub
drm/mediatek: return if plane pending state is disabled.
If the plane pending state is disabled, call
mtk_ovl_layer_offthen return.
This guarantees that that the state is valid for all operations when the pending state is enabled.For this series, applied to mediatek-drm-next-5.6 [1], thanks.
[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.6
Regards,
CKQuoted 12 lines
Suggested-by Sean Paul <[email protected]>To: CK Hu <[email protected]>
To: [email protected]Cc Daniele Castagna <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Mark Yacoub <[email protected]>Review
Quoted 5 lines
--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/mediatek/mtk_disp_ovl.cdrivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct
Quoted 4 lines
index
4a55bb6e2213..526b595eeff9100644drivers/gpu/drm/mediatek/mtk_disp_ovl.c +0
-0@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct
mtk_ddp_comp*comp, unsigned int idx,Quoted 9 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +3
-1unsigned int src_size = (pending->height <<16 ) | pending->width;unsigned int con; -if (!pending->enable) +if (!pending->enable) {mtk_ovl_layer_off (comp, idx); +return ; + }
Quoted 15 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c static void mtk_ovl_layer_config(struct mtk_ddp_comp
Quoted 3 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +0
-0con =ovl_fmt_convert (ovl, fmt);if (idx !=0 )@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp*comp, unsigned int idx,
Quoted 9 lines
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1
-2writel_relaxed (offset, comp->regs +DISP_REG_OVL_OFFSET (idx));writel_relaxed (addr, comp->regs +DISP_REG_OVL_ADDR (ovl, idx)); -if (pending->enable) -mtk_ovl_layer_on (comp, idx); +mtk_ovl_layer_on (comp, idx); }static void mtk_ovl_bgclr_in_on (struct mtk_ddp_comp *comp)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel