Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp891640rdb; Tue, 30 Jan 2024 01:29:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGu8AJaRYN+et4fsUtK5Dv9jVLp6kvSktt2L4bwM7/oATuGAEu7XLDapc+Coz8MMGnrQIp5 X-Received: by 2002:a05:6a00:1791:b0:6db:9c1:7164 with SMTP id s17-20020a056a00179100b006db09c17164mr1098212pfg.15.1706606967561; Tue, 30 Jan 2024 01:29:27 -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 e22-20020a637456000000b005ce018f427csi4720582pgn.235.2024.01.30.01.29.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:29:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44251-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=@kernel.org header.s=k20201202 header.b=VnwWbdZn; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-44251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 956EA28F50F for ; Tue, 30 Jan 2024 09:25:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC73E605DC; Tue, 30 Jan 2024 09:24:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VnwWbdZn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B52FD59155 for ; Tue, 30 Jan 2024 09:24:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706606646; cv=none; b=Xjs4DyFz2C3Rgx/azxwUN5Id4+bASP6Non/jYKH/S1opHG+JLfBHVQXEPR8/MsyWvY9RhGpTRNq11qU6EYaSDY+CS/Z5Clt+Q++bpoueEB5TKSK1OiHJ+gaTZVY3UoGkHIYCfib5j5GnmAuHC0OP4f+jTEgPIPCQTkn6qzMnM6c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706606646; c=relaxed/simple; bh=WTPD0u8lNCTsfkYlNmFQbgM3oe0GIKson6ZShvZ71kw=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=MX3wWGr38afQx4KY/6TVULiYdg8HS3DUeD8teNtsI+7M2tizgKrk4asQqWYEagxH3/ZfjkoPKywAMW19vplQW0DPX2kpTfcSrcmzZhWHpqkvRRNXfrde1kZCpYuRQS/xY3vFqVyVrk/2lBWOc0bD/ZQdYNQzKIrz0j2f79HPZho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VnwWbdZn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72015C43390; Tue, 30 Jan 2024 09:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706606646; bh=WTPD0u8lNCTsfkYlNmFQbgM3oe0GIKson6ZShvZ71kw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VnwWbdZnWEdUqlcs1nDlVIFBIRrbma+J9F81Qf9TjbfM3GTI4/Ltn0hn/bjFbbXto xfMGOo3Cl7eIQQfodxaGE5D0m5gKrbhIkFJE4bxUOdjGYo2F3JN0vLAdvvmhNiziOk hlqZMKDZG5lZ0AdIagtzaWNVmWEkli9NdCb4wB16Z2WW+LA0aVOuo0tjHNZAcA1dwb 0dE95dOy+teCDMIjKQUm5VkyBrZJ2LrFL0h1HLNQ1FAkPfYHTeIWDtlx4VrR3lVPth krAJuIKYQhA3KHzwyODPPmz4a6UmwwVf9Gja8ih/Y0s94zSoc/Axg9RmQQCEee5rzC ObS0JSRS9ihIA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 30 Jan 2024 10:24:00 +0100 From: Michael Walle To: Dario Binacchi Cc: Dave Airlie , Dmitry Osipenko , Inki Dae , Neil Armstrong , Laurent Pinchart , Robert Foss , Frieder Schrempf , Jagan Teki , Andrzej Hajda , Marek Szyprowski , Jonas Karlman , Jernej Skrabec , Tim Harvey , Alexander Stein , linux-kernel@vger.kernel.org, DRI mailing list , Daniel Vetter , Michael Trimarchi Subject: Re: [PATCH] drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE In-Reply-To: References: <20231113164344.1612602-1-mwalle@kernel.org> <631fe35a2a3b00781231e4f3f5094fae@kernel.org> <1ef3dad2-5f55-40e5-bba7-3c71d71c12e4@kontron.de> <2400535875c353ff7208be2d86d4556f@kernel.org> <31e1a38a1d012a32d6f7bc8372b6360e@kernel.org> Message-ID: <25f0cdf7305eac946629895179be8f2b@kernel.org> X-Sender: mwalle@kernel.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Hi Dario, >> >> Just FYI this conflictted pretty heavily with drm-misc-next changes in >> >> the same area, someone should check drm-tip has the correct >> >> resolution, I'm not really sure what is definitely should be. >> > >> > FWIW, this looks rather messy now. The drm-tip doesn't build. >> > >> > There was a new call to samsung_dsim_set_stop_state() introduced >> > in commit b2fe2292624ac (drm: bridge: samsung-dsim: enter display >> > mode in the enable() callback). >> >> I had a closer look at the latest linux-next (where somehow my patch >> made it into) and tried to apply commit b2fe2292624ac (drm: bridge: >> samsung-dsim: enter display mode in the enable() callback). It looks >> like only the following hunk is still needed from that patch. >> Everything >> else is covered by this fixes patch. >> >> Dario, could you rebase your commit onto this patch? I had a quick >> test >> with this change and it seems to work fine for our case. >> >> --snip-- >> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c >> b/drivers/gpu/drm/bridge/samsung-dsim.c >> index 63a1a0c88be4..92755c90e7d2 100644 >> --- a/drivers/gpu/drm/bridge/samsung-dsim.c >> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c >> @@ -1498,6 +1498,8 @@ static void samsung_dsim_atomic_disable(struct >> drm_bridge *bridge, >> if (!(dsi->state & DSIM_STATE_ENABLED)) >> return; >> >> + samsung_dsim_set_display_enable(dsi, false); >> + >> dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; >> } >> >> @@ -1506,8 +1508,6 @@ static void >> samsung_dsim_atomic_post_disable(struct drm_bridge *bridge, >> { >> struct samsung_dsim *dsi = bridge_to_dsi(bridge); >> >> - samsung_dsim_set_display_enable(dsi, false); >> - >> dsi->state &= ~DSIM_STATE_ENABLED; >> pm_runtime_put_sync(dsi->dev); >> } >> --snip-- >> >> -michael > > I'm sorry, but I didn't understand well what I have to do. Basically, just rebase your patch (drm: bridge: samsung-dsim: enter display mode in the enable() callback) on top of linux-next. > This is what I have done: > > git clone > https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git > cd linux-next > # add your changes, the ones of the emails > git am --reject > 0001-drm-bridge-samsung-dsim-enter-display-mode-in-the-en.patch > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c > b/drivers/gpu/drm/bridge/samsung-dsim.c > index 92755c90e7d2..b47929072583 100644 > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > @@ -1508,6 +1508,9 @@ static void > samsung_dsim_atomic_post_disable(struct drm_bridge *bridge, > { > struct samsung_dsim *dsi = bridge_to_dsi(bridge); > > + if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) > + samsung_dsim_set_stop_state(dsi, true); > + This one should be removed. There is no stop state anymore. With that hunk, it doesn't compile anyway. > dsi->state &= ~DSIM_STATE_ENABLED; > pm_runtime_put_sync(dsi->dev); > } > > And then test the driver for my use case. Yes. The hunk I've posted above, should be all what's left of your patch, because as far as I see it, most of your changes are already contained in my fixes patch. What's left is that you disable the video mode in .disable() and not in post_disable(). -michael