dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: hdlcd: Stop failing atomic disable check
Date: Wed, 27 Feb 2019 09:40:58 +0000	[thread overview]
Message-ID: <20190227094058.GI25147@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <57a68c52732f1b463b036168d2d53737821d1087.1550862776.git.robin.murphy@arm.com>

Hi Robin,

Sorry for the delay in reviewing this patch, I am drowning a bit this
week in meetings :)

On Mon, Feb 25, 2019 at 02:39:13PM +0000, Robin Murphy wrote:
> When __drm_atomic_helper_disable_all() tries to commit the disabled
> state, we end up in hdlcd_crtc_atomic_check() with a mode clock rate
> of 0. If the input clock has a nonzero minimum rate, this fails the
> clk_round_rate() check and prevents the CRTC being torn down cleanly.
> 
> If we're disabling the output, though, then the clock rate should be
> pretty much irrelevant, so skip it in that case. The kerneldoc seems
> to imply that we probably shouldn't be looking at the rest of the
> state anyway if enable=false.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>


I'll pull your patch into my tree but it will be after v5.1-rc1 that
I'll send fixes to airlied.

> ---
> 
> I'm still occasionally trying to get to the bottom of why the HDLCD on
> Juno doesn't work properly with recent upstream EDK2 (the Linux driver
> thinks it's initialised and taken over, but the hardware stays stuck
> displaying the last contents of the EFI framebuffer). I was hoping that
> just unbinding and reprobing the HDLCD/TDA998x drivers might help reset
> things hard enough to start working again, but sadly no...

I think both HDLCD and Mali DP drivers misbehave when the bootloader
enables the device before the Linux driver probes. I'm interested in
sorting this one out and it involves talking to the SMMU as well, so
I'll get in touch with you outside this thread to see how I can
reproduce your EDK2 environment.

Best regards,
Liviu


> 
> Robin.
> 
>  drivers/gpu/drm/arm/hdlcd_crtc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
> index e4d67b70244d..30a0d9570b57 100644
> --- a/drivers/gpu/drm/arm/hdlcd_crtc.c
> +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
> @@ -193,6 +193,9 @@ 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 (!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.20.1.dirty
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-27  9:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 14:39 [PATCH] drm: hdlcd: Stop failing atomic disable check Robin Murphy
2019-02-27  9:40 ` Liviu Dudau [this message]
2019-03-19 13:14   ` Robin Murphy
2019-03-19 14:49     ` Liviu Dudau
2019-03-29 18:46       ` Robin Murphy
2019-04-01 16:06         ` Liviu Dudau
2019-04-02 17:40           ` Robin Murphy
2019-04-03  9:29             ` Liviu Dudau

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=20190227094058.GI25147@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robin.murphy@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;
as well as URLs for NNTP newsgroup(s).