diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-04-13 15:02:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-04-13 15:02:23 +0100 |
commit | f5c97b187962d612eb9661313d12671098908709 (patch) | |
tree | ea61663093baf7299d120e7fceecc811710abfce /sys-kernel | |
parent | dd248b5c5ce029aac8c7858ea56f492044f8592b (diff) |
drm/amd/display: disable CRTCs with NULL FB on their primary
Diffstat (limited to 'sys-kernel')
4 files changed, 98 insertions, 0 deletions
diff --git a/sys-kernel/linux-image-redcore/files/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch b/sys-kernel/linux-image-redcore/files/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch new file mode 100644 index 00000000..1fce1ef9 --- /dev/null +++ b/sys-kernel/linux-image-redcore/files/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch @@ -0,0 +1,48 @@ +diff -Naur linux-4.16.2/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c linux-4.16.2-p/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +--- linux-4.16.2/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 2018-04-12 12:30:01.000000000 +0200 ++++ linux-4.16.2-p/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 2018-04-13 15:31:41.086861095 +0200 +@@ -4776,33 +4776,6 @@ + return ret; + } + +-static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state, +- struct drm_crtc *crtc) +-{ +- struct drm_plane *plane; +- struct drm_crtc_state *crtc_state; +- +- WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc)); +- +- drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) { +- struct drm_plane_state *plane_state = +- drm_atomic_get_plane_state(state, plane); +- +- if (IS_ERR(plane_state)) +- return -EDEADLK; +- +- crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc); +- if (IS_ERR(crtc_state)) +- return PTR_ERR(crtc_state); +- +- if (crtc->primary == plane && crtc_state->active) { +- if (!plane_state->fb) +- return -EINVAL; +- } +- } +- return 0; +-} +- + static int amdgpu_dm_atomic_check(struct drm_device *dev, + struct drm_atomic_state *state) + { +@@ -4826,10 +4799,6 @@ + goto fail; + + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { +- ret = dm_atomic_check_plane_state_fb(state, crtc); +- if (ret) +- goto fail; +- + if (!drm_atomic_crtc_needs_modeset(new_crtc_state) && + !new_crtc_state->color_mgmt_changed) + continue; diff --git a/sys-kernel/linux-image-redcore/linux-image-redcore-4.16.2.ebuild b/sys-kernel/linux-image-redcore/linux-image-redcore-4.16.2.ebuild index 4845857d..223e5595 100644 --- a/sys-kernel/linux-image-redcore/linux-image-redcore-4.16.2.ebuild +++ b/sys-kernel/linux-image-redcore/linux-image-redcore-4.16.2.ebuild @@ -36,6 +36,7 @@ PATCHES=( "${FILESDIR}"/enable_alx_wol.patch "${FILESDIR}"/0001-Revert-swiotlb-remove-various-exports.patch "${FILESDIR}"/0001-Revert-x86-ACPI-cstate-Allow-ACPI-C1-FFH-MWAIT-use-o.patch "${FILESDIR}"/0001-Make-it-possible-to-disable-SWIOTLB-code-on-admgpu-a.patch + "${FILESDIR}"/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch "${FILESDIR}"/dma_coherent_ok-logic.patch "${FILESDIR}"/mute-pps_state_mismatch.patch "${FILESDIR}"/drop_ancient-and-wrong-msg.patch diff --git a/sys-kernel/linux-sources-redcore/files/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch b/sys-kernel/linux-sources-redcore/files/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch new file mode 100644 index 00000000..1fce1ef9 --- /dev/null +++ b/sys-kernel/linux-sources-redcore/files/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch @@ -0,0 +1,48 @@ +diff -Naur linux-4.16.2/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c linux-4.16.2-p/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +--- linux-4.16.2/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 2018-04-12 12:30:01.000000000 +0200 ++++ linux-4.16.2-p/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 2018-04-13 15:31:41.086861095 +0200 +@@ -4776,33 +4776,6 @@ + return ret; + } + +-static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state, +- struct drm_crtc *crtc) +-{ +- struct drm_plane *plane; +- struct drm_crtc_state *crtc_state; +- +- WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc)); +- +- drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) { +- struct drm_plane_state *plane_state = +- drm_atomic_get_plane_state(state, plane); +- +- if (IS_ERR(plane_state)) +- return -EDEADLK; +- +- crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc); +- if (IS_ERR(crtc_state)) +- return PTR_ERR(crtc_state); +- +- if (crtc->primary == plane && crtc_state->active) { +- if (!plane_state->fb) +- return -EINVAL; +- } +- } +- return 0; +-} +- + static int amdgpu_dm_atomic_check(struct drm_device *dev, + struct drm_atomic_state *state) + { +@@ -4826,10 +4799,6 @@ + goto fail; + + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { +- ret = dm_atomic_check_plane_state_fb(state, crtc); +- if (ret) +- goto fail; +- + if (!drm_atomic_crtc_needs_modeset(new_crtc_state) && + !new_crtc_state->color_mgmt_changed) + continue; diff --git a/sys-kernel/linux-sources-redcore/linux-sources-redcore-4.16.2.ebuild b/sys-kernel/linux-sources-redcore/linux-sources-redcore-4.16.2.ebuild index 8a020814..c0fe45d1 100644 --- a/sys-kernel/linux-sources-redcore/linux-sources-redcore-4.16.2.ebuild +++ b/sys-kernel/linux-sources-redcore/linux-sources-redcore-4.16.2.ebuild @@ -30,6 +30,7 @@ PATCHES=( "${FILESDIR}"/enable_alx_wol.patch "${FILESDIR}"/0001-Revert-swiotlb-remove-various-exports.patch "${FILESDIR}"/0001-Revert-x86-ACPI-cstate-Allow-ACPI-C1-FFH-MWAIT-use-o.patch "${FILESDIR}"/0001-Make-it-possible-to-disable-SWIOTLB-code-on-admgpu-a.patch + "${FILESDIR}"/revert-disable-CRTCs-with-NULL-FB-on-their-primary-plane.patch "${FILESDIR}"/dma_coherent_ok-logic.patch "${FILESDIR}"/mute-pps_state_mismatch.patch "${FILESDIR}"/drop_ancient-and-wrong-msg.patch |