Skip to contentSkip to conversation

drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0

PATCH Superseded Mark Yacoub 2 participants 7 messages Oct 27, 2021 – Dec 29, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0

From: Mark Yacoub <[email protected]>

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -1
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
 		state = kzalloc(sizeof(*state), GFP_KERNEL);
 		if (!state)
 			return;
-		plane->state = &state->base;
 	}
 
+	__drm_atomic_helper_plane_reset(plane, &state->base);
+
 	state->base.plane = plane;
 	state->pending.format = DRM_FORMAT_RGB565;
 }
Signature · 1 line
2.33.0.1079.g6e70778dc9-goog
maintainer
#1 lore raw

Hi Mark:

Mark Yacoub <[email protected]> 於 2021年10月28日 週四 上午12:28寫道:

Quoted 6 lines

From: Mark Yacoub <[email protected]>

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

This patch looks good to me, but please fix this checkpatch warning:

WARNING: From:/Signed-off-by: email address mismatch: 'From: Mark Yacoub <[email protected]>' != 'Signed-off-by: Mark Yacoub <[email protected]>'

total: 0 errors, 1 warnings, 11 lines checked

Regards,
Chun-Kuang.

Quoted 28 lines

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -2
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
                state = kzalloc(sizeof(*state), GFP_KERNEL);
                if (!state)
                        return;
-               plane->state = &state->base;
        }
 
+       __drm_atomic_helper_plane_reset(plane, &state->base);
+
        state->base.plane = plane;
        state->pending.format = DRM_FORMAT_RGB565;
 }
--

2.33.0.1079.g6e70778dc9-goog

#2 lore raw
Quoted 5 lines · Chun-Kuang Hu

Hi Mark:

Mark Yacoub <[email protected]> 於 2021年10月28日 週四 上午12:28寫道:

Quoted 1 line
Quoted 7 lines
Quoted 5 lines

From: Mark Yacoub <[email protected]>

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

This patch looks good to me, but please fix this checkpatch warning:

Uploaded a new revision. Thanks!

Quoted 38 lines

WARNING: From:/Signed-off-by: email address mismatch: 'From: Mark Yacoub <[email protected]>' != 'Signed-off-by: Mark Yacoub <[email protected]>'

total: 0 errors, 1 warnings, 11 lines checked

Regards,
Chun-Kuang.

Quoted 28 lines

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -2
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
                state = kzalloc(sizeof(*state), GFP_KERNEL);
                if (!state)
                        return;
-               plane->state = &state->base;
        }
 
+       __drm_atomic_helper_plane_reset(plane, &state->base);
+
        state->base.plane = plane;
        state->pending.format = DRM_FORMAT_RGB565;
 }
--

2.33.0.1079.g6e70778dc9-goog

#3 lore raw

PATCH v2 1/1 drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0

In reply to Mark Yacoub

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -1
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
 		state = kzalloc(sizeof(*state), GFP_KERNEL);
 		if (!state)
 			return;
-		plane->state = &state->base;
 	}
 
+	__drm_atomic_helper_plane_reset(plane, &state->base);
+
 	state->base.plane = plane;
 	state->pending.format = DRM_FORMAT_RGB565;
 }
Signature · 1 line
2.34.1.173.g76aa8bc2d0-goog
maintainer Applied
#4 lore raw

Hi, Mark:

Mark Yacoub <[email protected]> 於 2021年12月14日 週二 上午12:08寫道:

Quoted 4 lines

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

Quoted 28 lines

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -2
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
                state = kzalloc(sizeof(*state), GFP_KERNEL);
                if (!state)
                        return;
-               plane->state = &state->base;
        }
 
+       __drm_atomic_helper_plane_reset(plane, &state->base);
+
        state->base.plane = plane;
        state->pending.format = DRM_FORMAT_RGB565;
 }
--

2.34.1.173.g76aa8bc2d0-goog

#5 lore raw

Thank you so much!

Quoted 44 lines · Chun-Kuang Hu

Hi, Mark:

Mark Yacoub <[email protected]> 於 2021年12月14日 週二 上午12:08寫道:

Quoted 4 lines

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

Quoted 28 lines

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -2
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
                state = kzalloc(sizeof(*state), GFP_KERNEL);
                if (!state)
                        return;
-               plane->state = &state->base;
        }
 
+       __drm_atomic_helper_plane_reset(plane, &state->base);
+
        state->base.plane = plane;
        state->pending.format = DRM_FORMAT_RGB565;
 }
--

2.34.1.173.g76aa8bc2d0-goog

#6 lore raw

hey - uploaded v2 that takes care of the panel:
https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

Thanks!

Quoted 48 lines · Mark Yacoub

Thank you so much!

Quoted 44 lines · Chun-Kuang Hu

Hi, Mark:

Mark Yacoub <[email protected]> 於 2021年12月14日 週二 上午12:08寫道:

Quoted 4 lines

At the reset hook, call __drm_atomic_helper_plane_reset which is called at the initialization of the plane and sets the default value of rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

Quoted 28 lines

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +2 -2
index e6dcb34d30522..accd26481b9fb 100644
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
                state = kzalloc(sizeof(*state), GFP_KERNEL);
                if (!state)
                        return;
-               plane->state = &state->base;
        }
 
+       __drm_atomic_helper_plane_reset(plane, &state->base);
+
        state->base.plane = plane;
        state->pending.format = DRM_FORMAT_RGB565;
 }
--

2.34.1.173.g76aa8bc2d0-goog