Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp103128rdb; Wed, 17 Jan 2024 19:25:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IG49vTl2oQSZjRE5ejUxCE+cvapLaYD24QmD1vwNC2VpqZpFJYwsLijJoSX/LIFaYtJ31b+ X-Received: by 2002:aa7:8886:0:b0:6d9:f3b6:691d with SMTP id z6-20020aa78886000000b006d9f3b6691dmr291700pfe.67.1705548329877; Wed, 17 Jan 2024 19:25:29 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jo12-20020a056a00908c00b006d9a00bc37asi3114956pfb.218.2024.01.17.19.25.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 19:25:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b=oIPQS9Bi; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-29688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6D1C0284FC7 for ; Thu, 18 Jan 2024 03:25:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBA6EAD5E; Thu, 18 Jan 2024 03:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="oIPQS9Bi" Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93B0DAD32 for ; Thu, 18 Jan 2024 03:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705548323; cv=none; b=uYLgOyZH2XJMcQwEMepnnuix1YFG3+AmLml9p4phwN0Fb7YlMiMj4CbZAfMf8xQb02gl9Ymu+40JwXodSr8SDDY7250Xjuvf13erPjP9YRgueOj2LJ2Qwn2IHp5uzGR1UtZ4zAh4vsmi9a+onliDCx/2cTRrTCYkE9zccAqva+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705548323; c=relaxed/simple; bh=M7BOYEdezAOzVq0xrdZOq9iiRomKdt1QdNIDNsIFjCU=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=riGkAFWYDOkbmRiqcCKtLMfeoYjnCQl3jmVmjrqMf5cCqU3VK4o2i+DzLTSBSziAcyR+kjM8Pz9dEL0K5nwzxX1YCAgNl7wMi7DxPf0lUHFyyGiCfBAUuqPN8uu423MPZrr9q7Gc/FDqi9xcDlckg6c63Q40bnsflMXd171matk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=oIPQS9Bi; arc=none smtp.client-ip=209.85.166.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-3608402ab93so43088685ab.0 for ; Wed, 17 Jan 2024 19:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1705548321; x=1706153121; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ii56IFJu065FnMv6OshmGSGQK3NaWenX9LFIh28GHDw=; b=oIPQS9BiBxJB8eJgU1V4qnfX9W2ozAMT9vlV6KtIsSLHezifz1A0R91rtk9hhcf3y1 pFdilCpp8rwjzNw2earg5jSgjUoItRRdTx30BQFoDPN5zzVoVJ0PCMsuRLaz9kgbEwGy Szv8n6jTECugh2VSFYYwHvhAuecuGHHuU7q/8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705548321; x=1706153121; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ii56IFJu065FnMv6OshmGSGQK3NaWenX9LFIh28GHDw=; b=QuIpq5l6JGlERaZjN92d6AWNXOMH0eYwsQzVYNxbIQLP8NTzoHbOgX9Rix/kOjba9Z AB6tDYfbrux7So8DgPKnJMCcQNM/Y9wf41Myem8uS+wbgKojrRics1VzvJ3wG5Y5xNAY j/h37ShlsFsebx6fRygOXL5Bxl8KErMFFSrtGysZLTNR33C81vhipDD0Apy6Cjtj0xot GJQerFM3/5waEj4Ahv27MZxyX38fGE58/qYwGSY7j35zTDNWbRI2pGNTfKSV2OSpNIUs uDkwwFMFRloNP0sH907r+iBWf9T2YnfmA1zNzINgUOzWyO6H2bJAx/XvPKm4h9ZWWu/U C2Fg== X-Gm-Message-State: AOJu0Yyw0EiYztjhbNnaIW6zBI+LSJ2TNNDqeRzWpaq9m4jUEVKyyt1c 5o6k6kG9CCb62XRYmFsPgHZfz0lFqQX05OeHtw0xt30ry6DKtNcATsQJJbt8wibHQfJFs25hsQy 9df+3E10dJ2xLogc6S2qEqM2BhX10wn2G6O2B X-Received: by 2002:a05:6e02:1bc9:b0:361:8c6f:fbd0 with SMTP id x9-20020a056e021bc900b003618c6ffbd0mr388527ilv.49.1705548320834; Wed, 17 Jan 2024 19:25:20 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240109120528.1292601-1-treapking@chromium.org> In-Reply-To: From: Pin-yen Lin Date: Thu, 18 Jan 2024 11:25:09 +0800 Message-ID: Subject: Re: [PATCH v2] drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable() To: Doug Anderson Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org, Sean Paul , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Doug, On Thu, Jan 18, 2024 at 2:37=E2=80=AFAM Doug Anderson wrote: > > Hi, > > On Wed, Jan 17, 2024 at 9:34=E2=80=AFAM Doug Anderson wrote: > > > > Hi, > > > > On Tue, Jan 9, 2024 at 8:52=E2=80=AFAM Doug Anderson wrote: > > > > > > Hi, > > > > > > On Tue, Jan 9, 2024 at 4:05=E2=80=AFAM Pin-yen Lin wrote: > > > > > > > > The ps8640 bridge seems to expect everything to be power cycled at = the > > > > disable process, but sometimes ps8640_aux_transfer() holds the runt= ime > > > > PM reference and prevents the bridge from suspend. > > > > > > > > Prevent that by introducing a mutex lock between ps8640_aux_transfe= r() > > > > and .post_disable() to make sure the bridge is really powered off. > > > > > > > > Fixes: 826cff3f7ebb ("drm/bridge: parade-ps8640: Enable runtime pow= er management") > > > > Signed-off-by: Pin-yen Lin > > > > --- > > > > > > > > Changes in v2: > > > > - Use mutex instead of the completion and autosuspend hack > > > > > > > > drivers/gpu/drm/bridge/parade-ps8640.c | 16 ++++++++++++++++ > > > > 1 file changed, 16 insertions(+) > > > > > > This looks OK to me now. > > > > > > Reviewed-by: Douglas Anderson > > > > > > I'll let it stew on the mailing list for ~1 week and then land it in > > > drm-misc-fixes unless there are additional comments. > > > > Pushed to drm-misc-fixes: > > > > 26db46bc9c67 drm/bridge: parade-ps8640: Ensure bridge is suspended in > > .post_disable() > > Crud. I landed this and then almost immediately hit a bug with it. :( > I've posted up the fix: > > https://lore.kernel.org/r/20240117103502.1.Ib726a0184913925efc7e99c4d4fc8= 01982e1bc24@changeid > > -Doug Sorry, I missed this because the patch was based on drm-misc-next, so it did not include commit 024b32db43a3 ("drm/bridge: parade-ps8640: Wait for HPD when doing an AUX transfer"). I also forgot to apply that commit when I did my testing. Pin-yen