summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/renesas
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2023-09-15 10:53:52 +0200
committerGeert Uytterhoeven <geert+renesas@glider.be>2023-10-16 11:47:47 +0200
commite3c8898b3861751edcad1023edaabae719fe1f83 (patch)
tree0c147d80c18160b09a6107688b1a48b295cbd5c7 /drivers/gpu/drm/renesas
parent4afa041043c21e0af93efb1a344e84edb1326fa9 (diff)
drm: renesas: shmobile: Atomic conversion part 2
Implement atomic mode setting for the CRTC, using the existing dpms callback. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/ca2a00200ef5ac899a6131087d0a30de1c806119.1694767209.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/gpu/drm/renesas')
-rw-r--r--drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c41
1 files changed, 15 insertions, 26 deletions
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index c277f9366882..5c0575eed3ab 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -11,6 +11,7 @@
#include <linux/media-bus-format.h>
#include <linux/pm_runtime.h>
+#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_atomic_state_helper.h>
#include <drm/drm_atomic_uapi.h>
@@ -319,27 +320,6 @@ static void shmob_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
scrtc->dpms = mode;
}
-static void shmob_drm_crtc_mode_prepare(struct drm_crtc *crtc)
-{
- shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
-}
-
-static void shmob_drm_crtc_mode_commit(struct drm_crtc *crtc)
-{
- shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
-}
-
-static int shmob_drm_crtc_atomic_check(struct drm_crtc *crtc,
- struct drm_atomic_state *state)
-{
- return 0;
-}
-
-static void shmob_drm_crtc_atomic_begin(struct drm_crtc *crtc,
- struct drm_atomic_state *state)
-{
-}
-
static void shmob_drm_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_atomic_state *state)
{
@@ -356,13 +336,22 @@ static void shmob_drm_crtc_atomic_flush(struct drm_crtc *crtc,
}
}
+static void shmob_drm_crtc_atomic_enable(struct drm_crtc *crtc,
+ struct drm_atomic_state *state)
+{
+ shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
+}
+
+static void shmob_drm_crtc_atomic_disable(struct drm_crtc *crtc,
+ struct drm_atomic_state *state)
+{
+ shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
+}
+
static const struct drm_crtc_helper_funcs crtc_helper_funcs = {
- .dpms = shmob_drm_crtc_dpms,
- .prepare = shmob_drm_crtc_mode_prepare,
- .commit = shmob_drm_crtc_mode_commit,
- .atomic_check = shmob_drm_crtc_atomic_check,
- .atomic_begin = shmob_drm_crtc_atomic_begin,
.atomic_flush = shmob_drm_crtc_atomic_flush,
+ .atomic_enable = shmob_drm_crtc_atomic_enable,
+ .atomic_disable = shmob_drm_crtc_atomic_disable,
};
static int shmob_drm_crtc_page_flip(struct drm_crtc *crtc,