dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
	Benjamin Gaignard <benjamin.gaignard@st.com>,
	Philippe Cornu <philippe.cornu@st.com>,
	dri-devel@lists.freedesktop.org,
	Yannick Fertre <yannick.fertre@st.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 5.6 072/149] drm/stm: ltdc: check crtc state before enabling LIE
Date: Sat, 11 Apr 2020 19:02:29 -0400	[thread overview]
Message-ID: <20200411230347.22371-72-sashal@kernel.org> (raw)
In-Reply-To: <20200411230347.22371-1-sashal@kernel.org>

From: Yannick Fertre <yannick.fertre@st.com>

[ Upstream commit a6bd58c51ac43083f3977057a7ad668def55812f ]

Following investigations of a hardware bug, the LIE interrupt
can occur while the display controller is not activated.
LIE interrupt (vblank) don't have to be set if the CRTC is not
enabled.

Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1579601650-7055-1-git-send-email-yannick.fertre@st.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/stm/ltdc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index c2815e8ae1da2..ea654c7280f7e 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -648,9 +648,14 @@ static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = {
 static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc)
 {
 	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
+	struct drm_crtc_state *state = crtc->state;
 
 	DRM_DEBUG_DRIVER("\n");
-	reg_set(ldev->regs, LTDC_IER, IER_LIE);
+
+	if (state->enable)
+		reg_set(ldev->regs, LTDC_IER, IER_LIE);
+	else
+		return -EPERM;
 
 	return 0;
 }
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-04-11 23:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200411230347.22371-1-sashal@kernel.org>
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 010/149] drm/amd/display: differentiate vsc sdp colorimetry use criteria between MST and SST Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 015/149] drm/amd/display: Explicitly disable triplebuffer flips Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 016/149] drm/amd/display: Fix test pattern color space inconsistency for Linux Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 023/149] drm/amdgpu: check GFX RAS capability before reset counters Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 031/149] drm/tegra: dc: Release PM and RGB output when client's registration fails Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 033/149] drm/amd/display: Stop if retimer is not available Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 036/149] drm/amd/display: writing stereo polarity register if swapped Sasha Levin
2020-04-11 23:01 ` [PATCH AUTOSEL 5.6 039/149] drm/amd/display: Fix default logger mask definition Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 046/149] drm/amd/display: Only round InfoFrame refresh rates Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 047/149] drm/amd/display: Fix HDMI repeater authentication Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 049/149] drm/panel: simple: fix osd070t1718_19ts sync drive edge Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 059/149] drm/sun4i: dsi: Use NULL to signify "no panel" Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 065/149] drm/amdgpu: Fix missing error check in suspend Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 068/149] drm/amd/display: always apply T7/T9 delay logic Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 069/149] drm/omap: fix possible object reference leak Sasha Levin
2020-04-11 23:02 ` Sasha Levin [this message]
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 073/149] fbdev: potential information leak in do_fb_ioctl() Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 074/149] drm/crc: Actually allow to change the crc source Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 075/149] drm/amdgpu: fix parentheses in amdgpu_vm_update_ptes Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 076/149] drm/amd/display: dc_get_vmid_use_vector() crashes when get called Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 087/149] drm/amd/display: dal_ddc_i2c_payloads_create can fail causing panic Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 088/149] drm/amd/display: System crashes when add_ptb_to_table() gets called Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 089/149] drm/omap: dss: Cleanup DSS ports on initialisation failure Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 090/149] drm/amdkfd: Fix a memory leak in queue creation error handling Sasha Levin
2020-04-11 23:02 ` [PATCH AUTOSEL 5.6 095/149] drm/amd/display: Fix dmub_psr_destroy() Sasha Levin
2020-04-11 23:03 ` [PATCH AUTOSEL 5.6 105/149] drm/msm: fix leaks if initialization fails Sasha Levin
2020-04-11 23:03 ` [PATCH AUTOSEL 5.6 106/149] drm/msm/a5xx: Always set an OPP supported hardware value Sasha Levin
2020-04-11 23:03 ` [PATCH AUTOSEL 5.6 149/149] PCI: Use ioremap(), not phys_to_virt() for platform ROM Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200411230347.22371-72-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=benjamin.gaignard@st.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=philippe.cornu@st.com \
    --cc=stable@vger.kernel.org \
    --cc=yannick.fertre@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).