All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karol Herbst <kherbst@redhat.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Dom Cobley <dom@raspberrypi.com>,
	Tim Gover <tim.gover@raspberrypi.com>,
	David Airlie <airlied@linux.ie>,
	nouveau <nouveau@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Ben Skeggs <bskeggs@redhat.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Phil Elwell <phil@raspberrypi.com>
Subject: Re: [Nouveau] [PATCH v2 13/22] drm/nouveau/kms: Remove redundant zpos initialisation
Date: Mon, 21 Feb 2022 17:42:36 +0100	[thread overview]
Message-ID: <CACO55tt8eTkEZp_DSFQ3Lt3+WBX1g3iwrB6-eTT=91bAk1NPEw@mail.gmail.com> (raw)
In-Reply-To: <20220221095918.18763-14-maxime@cerno.tech>

On Mon, Feb 21, 2022 at 11:00 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> The nouveau KMS driver will call drm_plane_create_zpos_property() with
> an init value depending on the plane purpose.
>
> Since the initial value wasn't carried over in the state, the driver had
> to set it again in nv50_wndw_reset(). However, the helpers have been
> adjusted to set it properly at reset, so this is not needed anymore.
>
> Cc: nouveau@lists.freedesktop.org
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Karol Herbst <kherbst@redhat.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> index 133c8736426a..0c1a2ea0ed04 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> @@ -635,8 +635,6 @@ nv50_wndw_reset(struct drm_plane *plane)
>                 plane->funcs->atomic_destroy_state(plane, plane->state);
>
>         __drm_atomic_helper_plane_reset(plane, &asyw->state);
> -       plane->state->zpos = nv50_wndw_zpos_default(plane);
> -       plane->state->normalized_zpos = nv50_wndw_zpos_default(plane);

so reading the surrounding code a little it feels like those
assignments actually do something. If my understanding is correct
plane->state points to &asyw->state, but asyw was just kzalloced in
this function. __drm_atomic_helper_plane_reset doesn't set the zpos or
normalized_zpos fields as long as zpos_property is 0, so those fields
won't be set with that change anymore.

I just don't know if it's fine like that or if this function should
set zpos_property instead or something. Anyway, the commit description
makes it sound like that an unneeded assignment would be removed here,
which doesn't seem to be the case. But I don't really know much about
all the drm API interactions, so it might just be fine, mostly asking
to get a better idea on how all those pieces fit together.

>  }
>
>  static void



> --
> 2.35.1
>


WARNING: multiple messages have this Message-ID (diff)
From: Karol Herbst <kherbst@redhat.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Dom Cobley <dom@raspberrypi.com>,
	Tim Gover <tim.gover@raspberrypi.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	David Airlie <airlied@linux.ie>,
	nouveau <nouveau@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Ben Skeggs <bskeggs@redhat.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Phil Elwell <phil@raspberrypi.com>
Subject: Re: [PATCH v2 13/22] drm/nouveau/kms: Remove redundant zpos initialisation
Date: Mon, 21 Feb 2022 17:42:36 +0100	[thread overview]
Message-ID: <CACO55tt8eTkEZp_DSFQ3Lt3+WBX1g3iwrB6-eTT=91bAk1NPEw@mail.gmail.com> (raw)
In-Reply-To: <20220221095918.18763-14-maxime@cerno.tech>

On Mon, Feb 21, 2022 at 11:00 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> The nouveau KMS driver will call drm_plane_create_zpos_property() with
> an init value depending on the plane purpose.
>
> Since the initial value wasn't carried over in the state, the driver had
> to set it again in nv50_wndw_reset(). However, the helpers have been
> adjusted to set it properly at reset, so this is not needed anymore.
>
> Cc: nouveau@lists.freedesktop.org
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Karol Herbst <kherbst@redhat.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> index 133c8736426a..0c1a2ea0ed04 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> @@ -635,8 +635,6 @@ nv50_wndw_reset(struct drm_plane *plane)
>                 plane->funcs->atomic_destroy_state(plane, plane->state);
>
>         __drm_atomic_helper_plane_reset(plane, &asyw->state);
> -       plane->state->zpos = nv50_wndw_zpos_default(plane);
> -       plane->state->normalized_zpos = nv50_wndw_zpos_default(plane);

so reading the surrounding code a little it feels like those
assignments actually do something. If my understanding is correct
plane->state points to &asyw->state, but asyw was just kzalloced in
this function. __drm_atomic_helper_plane_reset doesn't set the zpos or
normalized_zpos fields as long as zpos_property is 0, so those fields
won't be set with that change anymore.

I just don't know if it's fine like that or if this function should
set zpos_property instead or something. Anyway, the commit description
makes it sound like that an unneeded assignment would be removed here,
which doesn't seem to be the case. But I don't really know much about
all the drm API interactions, so it might just be fine, mostly asking
to get a better idea on how all those pieces fit together.

>  }
>
>  static void



> --
> 2.35.1
>


  reply	other threads:[~2022-02-21 16:42 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21  9:58 [PATCH v2 00/22] drm: Fill in default values for plane properties Maxime Ripard
2022-02-21  9:58 ` [PATCH v2 01/22] drm/komeda: plane: switch to plane reset helper Maxime Ripard
2022-02-25 13:59   ` Liviu Dudau
2022-03-08 11:04   ` (subset) " Maxime Ripard
2022-02-21  9:58 ` [PATCH v2 02/22] drm/tegra: " Maxime Ripard
2022-02-21  9:58   ` Maxime Ripard
2022-02-21  9:58 ` [PATCH v2 03/22] drm/tegra: hub: Fix zpos initial value mismatch Maxime Ripard
2022-02-21  9:58   ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 04/22] drm/omap: plane: " Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 05/22] drm/amd/display: Fix color encoding mismatch Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 06/22] drm/object: Add drm_object_property_get_default_value() function Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 07/22] drm/object: Add default zpos value at reset Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 08/22] drm/tegra: plane: Remove redundant zpos initialisation Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 09/22] drm/komeda: " Maxime Ripard
2022-02-25 13:59   ` Liviu Dudau
2022-03-08 11:04   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 10/22] drm/exynos: " Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 11/22] drm/imx: ipuv3-plane: " Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 12/22] drm/msm/mdp5: " Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-25 17:14     ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 13/22] drm/nouveau/kms: " Maxime Ripard
2022-02-21  9:59   ` [Nouveau] " Maxime Ripard
2022-02-21 16:42   ` Karol Herbst [this message]
2022-02-21 16:42     ` Karol Herbst
2022-02-22 14:02     ` Maxime Ripard
2022-02-22 14:02       ` [Nouveau] " Maxime Ripard
2022-02-22 21:35       ` Karol Herbst
2022-02-22 21:35         ` Karol Herbst
2022-02-22 20:36   ` [Nouveau] " Lyude Paul
2022-02-22 20:36     ` Lyude Paul
2022-02-25 17:14   ` (subset) [Nouveau] " Maxime Ripard
2022-02-25 17:14     ` [Nouveau] (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 14/22] drm/omap: plane: " Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 15/22] drm/rcar: " Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-25 17:14     ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 16/22] drm/sti: " Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 17/22] drm/sun4i: layer: " Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-25 17:14     ` Maxime Ripard
2022-02-25 17:14     ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 18/22] drm/object: Add default color encoding and range value at reset Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 19/22] drm/komeda: plane: Remove redundant color encoding and range initialisation Maxime Ripard
2022-02-25 14:01   ` Liviu Dudau
2022-03-08 11:04   ` (subset) " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 20/22] drm/armada: overlay: " Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 21/22] drm/imx: ipuv3-plane: " Maxime Ripard
2022-02-21  9:59   ` Maxime Ripard
2022-02-21  9:59 ` [PATCH v2 22/22] drm/omap: plane: " Maxime Ripard
2022-02-25 17:14   ` (subset) " Maxime Ripard

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='CACO55tt8eTkEZp_DSFQ3Lt3+WBX1g3iwrB6-eTT=91bAk1NPEw@mail.gmail.com' \
    --to=kherbst@redhat.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=daniel.vetter@intel.com \
    --cc=dom@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime@cerno.tech \
    --cc=nouveau@lists.freedesktop.org \
    --cc=phil@raspberrypi.com \
    --cc=tim.gover@raspberrypi.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.