From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Brian Starkey <brian.starkey@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>,
David Airlie <airlied@linux.ie>,
DRI-devel <dri-devel@lists.freedesktop.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] drm: hdlcd: Skip checking the clock provider when CRTC is disabled.
Date: Wed, 1 Nov 2017 14:16:25 +0000 [thread overview]
Message-ID: <20171101141625.3297-1-Liviu.Dudau@arm.com> (raw)
Some clock providers (clk-vexpress-osc) trigger a WARN() when the
requested rate falls outside its capabilities, as is the case when
a CRTC gets disabled. Check if the CRTC's new state is enabled and
skip the clk_round_rate() call if it is not.
Reported-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
drivers/gpu/drm/arm/hdlcd_crtc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index 72b22b805412b..a1387a8bf78c4 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -193,6 +193,10 @@ static int hdlcd_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_display_mode *mode = &state->adjusted_mode;
long rate, clk_rate = mode->clock * 1000;
+ /* if the crtc is disabled, skip the clock check */
+ if (!state->enable)
+ return 0;
+
rate = clk_round_rate(hdlcd->clk, clk_rate);
if (rate != clk_rate) {
/* clock required by mode not supported by hardware */
--
2.14.1
next reply other threads:[~2017-11-01 14:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 14:16 Liviu Dudau [this message]
2017-11-01 14:42 ` Brian Starkey
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=20171101141625.3297-1-Liviu.Dudau@arm.com \
--to=liviu.dudau@arm.com \
--cc=airlied@linux.ie \
--cc=brian.starkey@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=malidp@foss.arm.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
all inboxes | Powered by JetHome®