Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1599380pxb; Fri, 1 Oct 2021 14:30:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrXdMZe4WM2ijNSAc17kSfpYfbHSDLpgxwxSY/bGC1JP5xFnhS65jnn2AB6gCK/AzAUfyC X-Received: by 2002:a65:6392:: with SMTP id h18mr199594pgv.397.1633123857399; Fri, 01 Oct 2021 14:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633123857; cv=none; d=google.com; s=arc-20160816; b=bdcdAUSGxxqp4VGegtWJuN7lpud7fVqZsShAsBrQXVh3ON/wKolmXjof51akEKXvob tMAYAmzwdPFau0VHsNcgwGoGDDW4iMHmafrVspJUr0MzWq/zMr2XSaaBm63gLgVpvYxh T9/NDyA/5H4jj5hOt24vyvNS9CbbfhDjbKCrQ11GOaME35XZpYwH+FbvqODraqIReE0d Ed9x9lakjhX5dYz8BLxXefQCY/KDB/IVxx5Ea49UVRVFcIXCfXxTgKRkATcObpF98GlD ob3uQ3gLbYUefa5hIjPUNree6w2ncYEdSYn3Szl7Y5gOTrlS/jNYMTynzAnNc/k8wGL2 TSLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rQO+lMXU6VmqpbbuMNNIj4s/iSRqxxtzgzbizBnbLmk=; b=bJ7j8JnUoVdnoHKB6uF2CnchTnBM0MQVSSXU8B6YJoUFetrGkBy4Znjwz2YrQjfpuQ 5+YhhbGYGpZ6eOVKBJP91yvA+cEhYUd/kUfYz74r/k5UzrAzZE6VXbTkvVh82ptXUi1o ohu7QN8gfhKgiCY7pkvScPmct2rHZcp9AzBrWvvbF9wW6/SZN4sG5IasNtyt7XdOHBWx 4+3QhkvC5uFPH/f7D77rfZwKmrkPdXVak0B593NGbsIM5V8OuJuNMsONv+Fq1l43TMkp dbM2IhNfw9DuBVqmkWJKr6Y7qE3UwGCj9s7btC0FqfrMK30Tgono63lJ8fWLFfTKErKN Y/RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iSh459FN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p19si7753914plp.147.2021.10.01.14.30.43; Fri, 01 Oct 2021 14:30:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iSh459FN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354936AbhJAVZ2 (ORCPT + 99 others); Fri, 1 Oct 2021 17:25:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbhJAVZ1 (ORCPT ); Fri, 1 Oct 2021 17:25:27 -0400 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04662C061775 for ; Fri, 1 Oct 2021 14:23:43 -0700 (PDT) Received: by mail-oi1-x22f.google.com with SMTP id y201so13072848oie.3 for ; Fri, 01 Oct 2021 14:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rQO+lMXU6VmqpbbuMNNIj4s/iSRqxxtzgzbizBnbLmk=; b=iSh459FN5Z6Hqy9OYQZTytx3xm7vgeROeRrUA3KkjbSpJr6gHBeJtPg+IG1UktWtKi j0nWzggnhcvpJsq6Oc90kySnuaUsE8mLUC3eHw503Ya41vqpbvJSsWuEN9YKwUQQAQ2f ku+ZlpxCosstDPHAfe22bGGCKuGlOe0VgHbA4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rQO+lMXU6VmqpbbuMNNIj4s/iSRqxxtzgzbizBnbLmk=; b=R/Nzw/uT/h1Pk6uOKoWjKo0z6uWKNvvTGqkP67Zdutclmux/l/+k8APBxsfWexzEHW nd+e0smqUksVaLqAKGYrGMh+lfpuhTlXXu5u82PaYbFmkIGida5isdklbxZaGPZIIR7u PuGlO5wbyrpWbJHc0rgYldVMn+K19KEgCmN0Wor886UUl+JVqP07hlWcnTXHu2eZpAcw 0QrhzfhaMMG9gr4wpMxu3GXDQ7Y32W7bIwRm8YZS1jSu9Cs4UIH2BcVZyWzi2Lo1IBtd 9GNKRNMCeGbSLcMv3ErkA/w69LwTJwk935BwQMOb/0dy/dkNLVAWQv/Latvg5w3bKSGz tObw== X-Gm-Message-State: AOAM53279aX51HkPmPw2Il8jIcgldn17hoOyGq/zfy73FlJ0d/n1zhf4 5qk4Bi87b1iUTPXBKW+7B0idMf1YfT2vqw== X-Received: by 2002:aca:d988:: with SMTP id q130mr5423773oig.148.1633123421883; Fri, 01 Oct 2021 14:23:41 -0700 (PDT) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com. [209.85.210.48]) by smtp.gmail.com with ESMTPSA id w2sm1370690oof.23.2021.10.01.14.23.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Oct 2021 14:23:41 -0700 (PDT) Received: by mail-ot1-f48.google.com with SMTP id x33-20020a9d37a4000000b0054733a85462so13121511otb.10 for ; Fri, 01 Oct 2021 14:23:41 -0700 (PDT) X-Received: by 2002:a05:6830:112:: with SMTP id i18mr82821otp.186.1633123420525; Fri, 01 Oct 2021 14:23:40 -0700 (PDT) MIME-Version: 1.0 References: <20210929144010.1.I773a08785666ebb236917b0c8e6c05e3de471e75@changeid> <20211001203722.GZ2515@art_vandelay> In-Reply-To: <20211001203722.GZ2515@art_vandelay> From: Brian Norris Date: Fri, 1 Oct 2021 14:23:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/brdige: analogix_dp: Grab runtime PM reference for DP-AUX To: Sean Paul Cc: Andrzej Hajda , Neil Armstrong , dri-devel , "open list:ARM/Rockchip SoC..." , Laurent Pinchart , Linux Kernel , Jonas Karlman , Jernej Skrabec , stable , Tomeu Vizoso Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 1, 2021 at 1:37 PM Sean Paul wrote: > On Wed, Sep 29, 2021 at 02:41:03PM -0700, Brian Norris wrote: > > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > > @@ -1632,8 +1632,23 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux, > > struct drm_dp_aux_msg *msg) > > { > > struct analogix_dp_device *dp = to_dp(aux); > > + int ret, ret2; > > > > - return analogix_dp_transfer(dp, msg); > > + ret = analogix_dp_prepare_panel(dp, true, false); > > + if (ret) { > > + DRM_DEV_ERROR(dp->dev, "Failed to prepare panel (%d)\n", ret); > > s/DRM_DEV_ERROR/drm_err/ Sure. Now that I'm looking a second time, I see the header recommends this. > > + return ret; > > + } > > + > > + pm_runtime_get_sync(dp->dev); > > + ret = analogix_dp_transfer(dp, msg); > > + pm_runtime_put(dp->dev); > > + > > + ret2 = analogix_dp_prepare_panel(dp, false, false); > > + if (ret2) > > + DRM_DEV_ERROR(dp->dev, "Failed to unprepare panel (%d)\n", ret2); > > What's the reasoning for not propagating unprepare failures? I feel like that > should be fair game. I suppose the underlying reason is laziness, sorry. But a related reason is the we probably should prefer propagating the analogix_dp_transfer() error, if it's non-zero, rather than the unprepare error. That's not too hard to do though, even if it's slightly more awkward. > > + > > + return ret; > > } > > > > struct analogix_dp_device * v2 coming. Regards, Brian