dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: cogarre@gmail.com, ML dri-devel <dri-devel@lists.freedesktop.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Dave Airlie <airlied@redhat.com>, Sam Ravnborg <sam@ravnborg.org>,
	Emil Velikov <emil.velikov@collabora.com>
Subject: Re: [PATCH] drm/ast: Don't check new mode if CRTC is being disabled
Date: Fri, 1 May 2020 14:20:40 +0100	[thread overview]
Message-ID: <CACvgo50vfeN1-JUOYAu_8H2LJV5qXadZhM21Zw8yepyOyS7rWw@mail.gmail.com> (raw)
In-Reply-To: <20200430091330.9824-1-tzimmermann@suse.de>

Hi Thomas,

Couple of fly-by ideas/suggestions.

On Thu, 30 Apr 2020 at 10:13, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Suspending failed because there's no mode if the CRTC is being
> disabled. Early-out in this case. This fixes runtime PM for ast.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/ast/ast_mode.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index 7a9f20a2fd303..089b7d9a0cf3f 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -801,6 +801,9 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
>                 return -EINVAL;
Unrelated:
This feels quite dirty. If AST1180 does not support atomic modeset
simply remove the DRIVER_ATOMIC bit.
You can do that at runtime, via drm_device::driver_features in say,
ast_detect_chip()?

The drm_driver::driver_features is immutable, or it ought to be.

>         }
>
> +       if (!state->enable)
> +               return 0; /* no checks required if CRTC is being disabled */
> +
I cannot think of a reason why a driver would need to perform
crtc_atomic_check, if the crtc is being disabled.
Can you spot any? If not, this should be better served in core, which
calls this callback.
Correct?

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

  parent reply	other threads:[~2020-05-01 13:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30  9:13 [PATCH] drm/ast: Don't check new mode if CRTC is being disabled Thomas Zimmermann
2020-04-30  9:22 ` Sam Ravnborg
2020-04-30  9:44   ` Thomas Zimmermann
2020-05-01 13:20 ` Emil Velikov [this message]
2020-05-04 12:07   ` Thomas Zimmermann
2020-05-04 15:31     ` Daniel Vetter
2020-05-06  8:06       ` Thomas Zimmermann
2020-05-06 10:58         ` Daniel Vetter
2020-05-05 14:13     ` Emil Velikov

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=CACvgo50vfeN1-JUOYAu_8H2LJV5qXadZhM21Zw8yepyOyS7rWw@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=airlied@redhat.com \
    --cc=cogarre@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=kraxel@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    /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).