Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp310263lqo; Thu, 9 May 2024 23:47:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMQPSGdpSGT4ugQD01oKFJSDF4qfe6uf7ToiqureKWg7SipqKi8qWmGnd/GGMcQLHbpwvRBm0JA3N83rSoYQUpMJD/xV3mJhwSr728yQ== X-Google-Smtp-Source: AGHT+IEwoBfbNSMhpxPIwSA7JBpMInwAPjCn3/GubWi9vqwLeWrEeUzAh4hEDBg1FyymxR0bpgZL X-Received: by 2002:a05:6a20:dd9e:b0:1af:d19b:a78 with SMTP id adf61e73a8af0-1afde0b7245mr2058680637.13.1715323645898; Thu, 09 May 2024 23:47:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715323645; cv=pass; d=google.com; s=arc-20160816; b=fYOgd7iawJLnyKGNTldMcxJX+2MFPL+xQzZ44X0EUEgymKfg8+zBdGfSWGVEtjvfDA gPEK5rtVFGSxS/IXTxCkdkNkKLJHjbQZhVZsdSHns/o1MmnpS9U5eT0ktIikCqRRLoXG AFRcfCS8LuyBzDsM0AX1t17V7g+1YeX7TIWErE941pkJNdJiEV5rc6AzAk9/+nDVw028 cMovHpxzT0b74+r54Movb1Ed0WRyIdueH+8+oQ6BlVB5tAz1mPv+QcitZmZYz/FQ3sJB m9CHoN1Qtpdwi2aRFoIGdxFg21kM24Hk6BaiaCPNIcgi/iLl3wbPQvDZ6ig9QsZD6vO0 8MTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=YBCt7hEw3xnKO8V8Yx6BUx3zL0FQuskSiNDFxdqn1dw=; fh=oKcclhz2U34fhCnL8U7VMEnRP9TIeTfRFr8RKfxuhHA=; b=fSCaNpUrERtWbm1195s3qMWH6+GLo1hTccLw/OQ9uUlKmb2cbVbBxdCLQUO3zKe2rS 82vrUrIfChR7d6jepaSI2zniP1Rttn4njHqBJFbkXlfINv0Wr4Tb8Crj6lUCuyszuaMm TZUNpXuaqpzu95MGxypXhlEU99HDQVKLiz6nVoCWWbil+A6bMhpor7T6JOgV5SKQd/M8 Tfdqzvg4qArf5Y1YGTdbgKUCaJpbEvgk1TubAd7rLNtkGIKhXyxhzDz1SdQB8zu2TR3Z pXitVyStuCHpQAH5746QvjANMqID4Q3c7E5x7IhRcshrAre4vgWwKaAaC5rF0WhM0/2g TwQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jVkW4SRA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-175345-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c15edbesi31290165ad.513.2024.05.09.23.47.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 23:47:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175345-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jVkW4SRA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-175345-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 735D4B20A02 for ; Fri, 10 May 2024 06:47:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE4381487F7; Fri, 10 May 2024 06:47:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jVkW4SRA" Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 E1F9114B09F for ; Fri, 10 May 2024 06:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715323635; cv=none; b=mZP0UdiXbwsB8FaJNdH4JouzWIPBJOf//8ikMXVNYTBAPcORo+GsrGe9QbLrQmc4MX6tKg+yI9GWO0GNlhhmD0BNBN+w7EKj8JmOBEd9knTF3TNpLM1WKJoSbgpo+ZTis5jvVlLrH5gM+LX9xiLJGOSHjhyy2Zi8vHK+PiYk5/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715323635; c=relaxed/simple; bh=4WGLjBTyR/7rXFpxQYH92xTWCiP4xe0xHhFZBljOkyU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QM94uTgxyqyK1O9TISWYtZDyjx6mMAQj8aPsdjX8QIC9iHkEMY/N0SwqxjFZGowqd+5x2qRBwHUg9FIVRJEG92MVPw15LMPjnTnrBDYqHFP+8SPAJUaNuYyMTUV5naslecyY5ccIeutMbp59HUNwxhWidcT9lHcCtES26qaYcpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jVkW4SRA; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2b3f5fcecc1so1414374a91.1 for ; Thu, 09 May 2024 23:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715323626; x=1715928426; 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=YBCt7hEw3xnKO8V8Yx6BUx3zL0FQuskSiNDFxdqn1dw=; b=jVkW4SRAMbVmc3OE3M6o9Shy9Os9XB5P6TvPcft62ICHcqSyBw5StVPtVQzf+FITns lSH+zSjMCT/fNkeLTFL1YqxlolASms1AMDt3jUrB7fFaoZd5lhPUxXh45LH0eWnftIGS waAhv1ukyUtb9gfrnzLZFFqDwFFEEAgpBpr7gQGkhK5BXsHh85TzwjX5qQMZXbqA5zXJ k9o9AnKZ3N6jrWbGTFujD9EDv8DDaDeJ9DrNiXJotGkNjzpqWc0BXPlgPbZVN6gDgyB3 N/oBSqekFJ36fSGg9Og0CpkAI5Rq2/wPs+/nO9RArse2hnXgFDpjjtE95sKgph7+u6i2 elRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715323626; x=1715928426; 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=YBCt7hEw3xnKO8V8Yx6BUx3zL0FQuskSiNDFxdqn1dw=; b=oWag0eRKEnMXwUfb73AtiXXiYxSBt5wzuAjBuLsXR0Bu8MZqIxB1uw6zwseyaFQM3O W6+iVfy3Bqka2nvrxI8LGaFgeB+VnKjIJnfGduUjyx+uB6ZJ+2SYPY2IZgEKgZRaqfBQ q4BJeika0uc9XvH8RUrLmphkDnWiZ6LooVSIIG6+USIj8Kd3HYn2hCAcZvMWIJ3l9nG2 nwWpVQd+sN43RfNDFz9HY2wAsVjCFJ2ecY5PDS8OsE4zQ9YUhNT65X2RiW6Cv0/fbZao htuZEDaBQ/Z/REdsYFKGR6L1d2Uc1JhATQhKtvK/Zc0c9gCLETjiGrzS373Go5NECr5C 3Fyw== X-Forwarded-Encrypted: i=1; AJvYcCUM0zAU2CpuxRz04gDOz3Y9dRgROViLm3JGzny85/cRJdazKKwRuLAxRZ/uQrUsyDXdArllE/gFPC9utWvSmwdRtMVgf49aGmAi2cEK X-Gm-Message-State: AOJu0YwmtqLQFB3d6Kje01TylTCFoxbN1fJIZ6+fc+4YOnxACbgU4E8R 1x69KSnxjbpqbJYV6X75U9FM0H0Wt3ujpONaaH8sB2bycPm6qL+SF03dUGXx1QpvphOj0pYBybQ qiQJWyW3cdMfu5mH+Nt/AUmH42/0= X-Received: by 2002:a17:90a:fc89:b0:2b2:468c:9fdd with SMTP id 98e67ed59e1d1-2b6cc3429ecmr1732360a91.8.1715323625926; Thu, 09 May 2024 23:47:05 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240509-jdi-use-disable-v1-1-5c175b2ea1ee@gmail.com> In-Reply-To: From: =?UTF-8?B?QmFybmFiw6FzIEN6w6ltw6Fu?= Date: Fri, 10 May 2024 08:46:54 +0200 Message-ID: Subject: Re: [PATCH] drm/panel: jdi-fhd-r63452: move DCS off commands to disable To: Dmitry Baryshkov Cc: Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 10, 2024 at 2:56=E2=80=AFAM Dmitry Baryshkov wrote: > > On Thu, May 09, 2024 at 08:14:07PM +0200, Barnab=C3=A1s Cz=C3=A9m=C3=A1n = wrote: > > Move DCS off commands from .unprepare to .disable so that they > > actually reach the DSI host. > > > > Signed-off-by: Barnab=C3=A1s Cz=C3=A9m=C3=A1n > > --- > > drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > I don't think this is correct. If the driver sends enable commands in > prepare, it should be able to send commands during unprepare too. > It cannot send commands in unprepare, there are multiple panel drivers what do the same. Every panel drivers which have DCS commands to be sent in unprepare has similar error messages with mdp5/dpu. [ 92.322564] panel-td4320-boeplus c994000.dsi.0: sending command 0x28 failed: -22 [ 92.322635] panel-td4320-boeplus c994000.dsi.0: Failed to un-initialize panel: -22 > > > > diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c b/drivers/gpu= /drm/panel/panel-jdi-fhd-r63452.c > > index 483dc88d16d8..f7222974d6ed 100644 > > --- a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c > > +++ b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c > > @@ -169,6 +169,15 @@ static int jdi_fhd_r63452_prepare(struct drm_panel= *panel) > > } > > > > static int jdi_fhd_r63452_unprepare(struct drm_panel *panel) > > +{ > > + struct jdi_fhd_r63452 *ctx =3D to_jdi_fhd_r63452(panel); > > + > > + gpiod_set_value_cansleep(ctx->reset_gpio, 1); > > + > > + return 0; > > +} > > + > > +static int jdi_fhd_r63452_disable(struct drm_panel *panel) > > { > > struct jdi_fhd_r63452 *ctx =3D to_jdi_fhd_r63452(panel); > > struct device *dev =3D &ctx->dsi->dev; > > @@ -178,8 +187,6 @@ static int jdi_fhd_r63452_unprepare(struct drm_pane= l *panel) > > if (ret < 0) > > dev_err(dev, "Failed to un-initialize panel: %d\n", ret); > > > > - gpiod_set_value_cansleep(ctx->reset_gpio, 1); > > - > > return 0; > > } > > > > @@ -219,6 +226,7 @@ static int jdi_fhd_r63452_get_modes(struct drm_pane= l *panel, > > static const struct drm_panel_funcs jdi_fhd_r63452_panel_funcs =3D { > > .prepare =3D jdi_fhd_r63452_prepare, > > .unprepare =3D jdi_fhd_r63452_unprepare, > > + .disable =3D jdi_fhd_r63452_disable, > > .get_modes =3D jdi_fhd_r63452_get_modes, > > }; > > > > > > --- > > base-commit: 704ba27ac55579704ba1289392448b0c66b56258 > > change-id: 20240509-jdi-use-disable-ee29098d9c81 > > > > Best regards, > > -- > > Barnab=C3=A1s Cz=C3=A9m=C3=A1n > > > > -- > With best wishes > Dmitry