Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1395210
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Robin Murphy <robin.murphy@arm.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] drm: hdlcd: Suspend/resume only active crtcs |
| Date | Thu, 05 May 2016 18:20:02 +0200 |
| Message-ID | <rvuam-36M-9@gated-at.bofh.it> (permalink) |
| References | <rvuam-36M-11@gated-at.bofh.it> |
| X-Mailer | git-send-email 2.8.1.dirty |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 41 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org |
| X-Original-Date | Thu, 5 May 2016 17:13:38 +0100 |
| X-Original-Message-ID | <759fe8d3dde95091a9df83018051cba00f494e1e.1462464611.git.robin.murphy@arm.com> |
| X-Original-References | <eeb2a5540f50f5a3dd7f87861be1e9117bc4ed65.1462464611.git.robin.murphy@arm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1395210 |
Show key headers only | View raw
The current PM ops simply unconditionally enable/disable the HDLCD,
which proves problematic when there is no display plugged in - since
without a crtc the hardware itself is still in an uninitialised state,
coming out of suspend results in it being enabled without a valid
framebuffer address, which typically results in it trying to scan out
from bus address 0 and flooding the system with error interrupts.
Fix this by checking the crtc state on resume, and only enabling the
hardware if it's actually supposed to be. For the sake of consistency,
do the same on the suspend path as well, although there it's merely a
case of skipping unnecessary work.
CC: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/gpu/drm/arm/hdlcd_crtc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index fef1b04c2aab..bf6ff5e48adc 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -296,12 +296,14 @@ static struct drm_plane *hdlcd_plane_init(struct drm_device *drm)
void hdlcd_crtc_suspend(struct drm_crtc *crtc)
{
- hdlcd_crtc_disable(crtc);
+ if (crtc->state->active)
+ hdlcd_crtc_disable(crtc);
}
void hdlcd_crtc_resume(struct drm_crtc *crtc)
{
- hdlcd_crtc_enable(crtc);
+ if (crtc->state->active)
+ hdlcd_crtc_enable(crtc);
}
int hdlcd_setup_crtc(struct drm_device *drm)
--
2.8.1.dirty
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/2] drm: hdlcd: Suspend/resume only active crtcs Robin Murphy <robin.murphy@arm.com> - 2016-05-05 18:20 +0200
Re: [PATCH 2/2] drm: hdlcd: Suspend/resume only active crtcs liviu.dudau@arm.com - 2016-05-05 19:00 +0200
Re: [PATCH 2/2] drm: hdlcd: Suspend/resume only active crtcs Daniel Vetter <daniel@ffwll.ch> - 2016-05-05 19:10 +0200
Re: [PATCH 2/2] drm: hdlcd: Suspend/resume only active crtcs liviu.dudau@arm.com - 2016-05-05 19:20 +0200
Re: [PATCH 2/2] drm: hdlcd: Suspend/resume only active crtcs Robin Murphy <robin.murphy@arm.com> - 2016-05-05 20:10 +0200
csiph-web