aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/0762-drm-amd-display-Drop-our-own-page_flip_helper.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0762-drm-amd-display-Drop-our-own-page_flip_helper.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/0762-drm-amd-display-Drop-our-own-page_flip_helper.patch96
1 files changed, 96 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0762-drm-amd-display-Drop-our-own-page_flip_helper.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0762-drm-amd-display-Drop-our-own-page_flip_helper.patch
new file mode 100644
index 00000000..3761f717
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0762-drm-amd-display-Drop-our-own-page_flip_helper.patch
@@ -0,0 +1,96 @@
+From ddfcbacb623960c1b7d2b595fbbd89be6f6d7483 Mon Sep 17 00:00:00 2001
+From: Harry Wentland <harry.wentland@amd.com>
+Date: Wed, 9 Aug 2017 15:26:38 -0400
+Subject: [PATCH 0762/4131] drm/amd/display: Drop our own page_flip_helper
+
+No longer needed since Andrey's fix made it upstream into
+drm_atomic_helper_page_flip
+
+Signed-off-by: Harry Wentland <harry.wentland@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 60 +----------------------
+ 1 file changed, 1 insertion(+), 59 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index 38ab68f..62e133b 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -2354,64 +2354,6 @@ void amdgpu_dm_crtc_destroy(struct drm_crtc *crtc)
+ kfree(crtc);
+ }
+
+-static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
+- struct drm_framebuffer *fb,
+- struct drm_pending_vblank_event *event,
+- uint32_t flags,
+- struct drm_modeset_acquire_ctx *ctx)
+-{
+- struct drm_plane *plane = crtc->primary;
+- struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
+- struct drm_atomic_state *state;
+- struct drm_plane_state *plane_state;
+- struct drm_crtc_state *crtc_state;
+- int ret = 0;
+-
+- state = drm_atomic_state_alloc(plane->dev);
+- if (!state)
+- return -ENOMEM;
+-
+- state->acquire_ctx = ctx;
+-
+- crtc_state = drm_atomic_get_crtc_state(state, crtc);
+- if (IS_ERR(crtc_state)) {
+- ret = PTR_ERR(crtc_state);
+- goto fail;
+- }
+- crtc_state->event = event;
+-
+- plane_state = drm_atomic_get_plane_state(state, plane);
+- if (IS_ERR(plane_state)) {
+- ret = PTR_ERR(plane_state);
+- goto fail;
+- }
+-
+- ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
+- if (ret != 0)
+- goto fail;
+- drm_atomic_set_fb_for_plane(plane_state, fb);
+-
+- /* Make sure we don't accidentally do a full modeset. */
+- state->allow_modeset = false;
+- if (!crtc_state->active) {
+- DRM_DEBUG_ATOMIC("[CRTC:%d] disabled, rejecting legacy flip\n",
+- crtc->base.id);
+- ret = -EINVAL;
+- goto fail;
+- }
+- acrtc->flip_flags = flags;
+- ret = drm_atomic_nonblocking_commit(state);
+- if (ret != 0)
+- goto fail;
+-
+- /* Driver takes ownership of state on successful async commit. */
+- return 0;
+-fail:
+- drm_atomic_state_put(state);
+-
+- return ret;
+-}
+-
+ static void dm_crtc_destroy_state(struct drm_crtc *crtc,
+ struct drm_crtc_state *state)
+ {
+@@ -2475,7 +2417,7 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = {
+ .gamma_set = drm_atomic_helper_legacy_gamma_set,
+ .set_config = drm_atomic_helper_set_config,
+ .set_property = drm_atomic_helper_crtc_set_property,
+- .page_flip = amdgpu_atomic_helper_page_flip,
++ .page_flip = drm_atomic_helper_page_flip,
+ .atomic_duplicate_state = dm_crtc_duplicate_state,
+ .atomic_destroy_state = dm_crtc_destroy_state,
+ };
+--
+2.7.4
+