All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <mwalle@kernel.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: DRI mailing list <dri-devel@lists.freedesktop.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Robert Foss <rfoss@kernel.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Tim Harvey <tharvey@gateworks.com>,
	linux-kernel@vger.kernel.org,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	Inki Dae <daeinki@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Dave Airlie <airlied@gmail.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: Re: [PATCH] drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE
Date: Tue, 30 Jan 2024 10:24:00 +0100	[thread overview]
Message-ID: <25f0cdf7305eac946629895179be8f2b@kernel.org> (raw)
In-Reply-To: <CABGWkvp5Xx61h+sfKotb=jsQE3jPXP0bJfTtb1k9_OCH-TzTvQ@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Michael Walle <mwalle@kernel.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: Dave Airlie <airlied@gmail.com>,
	Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	Inki Dae <daeinki@gmail.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Robert Foss <rfoss@kernel.org>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	linux-kernel@vger.kernel.org,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	Michael Trimarchi <michael@amarulasolutions.com>
Subject: Re: [PATCH] drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE
Date: Tue, 30 Jan 2024 10:24:00 +0100	[thread overview]
Message-ID: <25f0cdf7305eac946629895179be8f2b@kernel.org> (raw)
In-Reply-To: <CABGWkvp5Xx61h+sfKotb=jsQE3jPXP0bJfTtb1k9_OCH-TzTvQ@mail.gmail.com>

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

  reply	other threads:[~2024-01-30  9:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 16:43 [PATCH] drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE Michael Walle
2023-11-13 16:43 ` Michael Walle
2023-11-14  7:15 ` Alexander Stein
2023-11-14  7:15   ` Alexander Stein
2023-11-14  8:52   ` Michael Walle
2023-11-14  8:52     ` Michael Walle
2023-11-14 14:29 ` Frieder Schrempf
2023-11-14 14:29   ` Frieder Schrempf
2023-11-14 15:53   ` Michael Walle
2023-11-14 15:53     ` Michael Walle
2023-12-01  9:04 ` Michael Walle
2023-12-01  9:04   ` Michael Walle
2023-12-18 11:24   ` Frieder Schrempf
2023-12-18 11:24     ` Frieder Schrempf
2023-12-21  4:23     ` Inki Dae
2024-01-09  8:47       ` Michael Walle
2024-01-09  8:47         ` Michael Walle
2024-01-09 12:50         ` Daniel Vetter
2024-01-09 12:50           ` Daniel Vetter
2024-01-19  6:36           ` Inki Dae
2024-01-26 18:28             ` Dave Airlie
2024-01-26 18:28               ` Dave Airlie
2024-01-29  9:20               ` Frieder Schrempf
2024-01-29  9:20                 ` Frieder Schrempf
2024-01-29 16:51                 ` Frieder Schrempf
2024-01-29 16:51                   ` Frieder Schrempf
2024-01-29 10:32               ` Michael Walle
2024-01-29 10:32                 ` Michael Walle
2024-01-29 10:39                 ` Michael Walle
2024-01-29 10:39                   ` Michael Walle
2024-01-29 16:06                 ` Michael Walle
2024-01-29 16:06                   ` Michael Walle
2024-01-30  9:11                   ` Dario Binacchi
2024-01-30  9:11                     ` Dario Binacchi
2024-01-30  9:24                     ` Michael Walle [this message]
2024-01-30  9:24                       ` Michael Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25f0cdf7305eac946629895179be8f2b@kernel.org \
    --to=mwalle@kernel.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daeinki@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frieder.schrempf@kontron.de \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=michael@amarulasolutions.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=tharvey@gateworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.