From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11E94C4724C for ; Fri, 1 May 2020 13:23:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF96A20757 for ; Fri, 1 May 2020 13:23:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QBgcezRd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF96A20757 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 466FE6EC8D; Fri, 1 May 2020 13:23:01 +0000 (UTC) Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by gabe.freedesktop.org (Postfix) with ESMTPS id F33646EC8D for ; Fri, 1 May 2020 13:22:59 +0000 (UTC) Received: by mail-vs1-xe43.google.com with SMTP id e10so3607935vsp.12 for ; Fri, 01 May 2020 06:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U7xeNDMpHG9rttpBfQjByhPTpX3h4BbkQQpHxvH2CZY=; b=QBgcezRdiTZ5O0AKGNPhFnqQwJKhLxPatFGx1VkjabRFvvPJ2z7kDBQt2wFLybzz/s O5nr7B9UQPW93TqKjDq5h6h3D4X6+ZDvmUC8jQut7TTJnyiL9YTcOStN/quJtXRlzYFv iVLrSUg0rEQBTXqa9e44vriQgentq+xkjn7YncAUQSNxWgtfvzTxY4+OewqInuW6lyZY Uew1mpqbkdhe3XIvc/cvglrefbid4dr99wbjXBv7hW1BkHH4qeK86oqHyvmdvGLigu2W 7E7ShWBenmgqlw05U3q3B/x3WPdsAAJbvxCKkpCIAG/nUZr/1WvPpRBzHx2RzxXfI4Ve aomw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U7xeNDMpHG9rttpBfQjByhPTpX3h4BbkQQpHxvH2CZY=; b=GRrrYKx0Fg40qHSF9zSruwzLIRgJDL4h5lS4bP/1RNsv3AAZwdqmS0jeKFES+YIkAf Sfm+8aD9vp3dvVAqJF+ifk1MN/GnnMSsH6mvmDYN4yLiRzZhbXRrrbqy/0xwQoCiwY5E fFeVHFjRtX+O6ZoLoro0t80hiJlH28qPAq1UEg7zFTp3AXth2mQYEKhMsgF9d7ndNcbF c7x2+PMMZRF6ci1keRRekboGozz/c13XE/GycwlbxDJe1QyEeOKrXYnJshCTydWj1Jli ZwnD/tP7vzS6un+oYfj+siSrhMblI1uYLCJS6C/haIHX7Eix4e8xxglYlB3r5KK8/YnS VQIA== X-Gm-Message-State: AGi0PuakNH7Xui5s5TZSEw0+JXNfxicd+CkHfVW3QC4txjWTcSYqDLkK 7E3g9Udt/H149yLLFO4RZGGhRX2dik52WgqsOIU= X-Google-Smtp-Source: APiQypKB0BtXJ4i0ar2xkSBjNCYc8mbYtpFtlyqFHL2iNLNbpxtiE97/Xpm8hrfYyvE+tgBhrqSWJFnrxE/oPAaC3cU= X-Received: by 2002:a67:c482:: with SMTP id d2mr3091868vsk.37.1588339379008; Fri, 01 May 2020 06:22:59 -0700 (PDT) MIME-Version: 1.0 References: <20200430091330.9824-1-tzimmermann@suse.de> In-Reply-To: <20200430091330.9824-1-tzimmermann@suse.de> From: Emil Velikov Date: Fri, 1 May 2020 14:20:40 +0100 Message-ID: Subject: Re: [PATCH] drm/ast: Don't check new mode if CRTC is being disabled To: Thomas Zimmermann X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cogarre@gmail.com, ML dri-devel , Gerd Hoffmann , Dave Airlie , Sam Ravnborg , Emil Velikov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Thomas, Couple of fly-by ideas/suggestions. On Thu, 30 Apr 2020 at 10:13, Thomas Zimmermann 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 > --- > 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