From: "Dr. David Alan Gilbert" <linux@treblig.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch
Cc: ville.syrjala@linux.intel.com, jfalempe@redhat.com,
tomi.valkeinen@ideasonboard.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] Revert "drm/client: Add drm_client_modeset_check()"
Date: Mon, 3 Mar 2025 16:58:26 +0000 [thread overview]
Message-ID: <Z8Xfst88r_M_RZ3v@gallifrey> (raw)
In-Reply-To: <4ysvn7vcynvmjc53frgj2nwuctf6kd6xdphgfjm3ulgfaxwngm@mod6oqvfmxav>
* Dmitry Baryshkov (dmitry.baryshkov@linaro.org) wrote:
> On Tue, Oct 29, 2024 at 11:47:05PM +0000, linux@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> >
> > drm_client_modeset_check() was explicitly added in 2020 by
> > commit 64593f2a6fc9 ("drm/client: Add drm_client_modeset_check()")
> > but has never been used.
> >
> > This reverts commit 64593f2a6fc933bb9a410bc3f8c261f3e57a9601.
>
> Nit: Usually this comes before the commit message. No need for repost
> though.
>
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Hi,
Can drm pick this up please?
Thanks,
Dave
>
> >
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > ---
> > drivers/gpu/drm/drm_client_modeset.c | 35 ++++------------------------
> > include/drm/drm_client.h | 1 -
> > 2 files changed, 4 insertions(+), 32 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> > index cee5eafbfb81..39201c11eaac 100644
> > --- a/drivers/gpu/drm/drm_client_modeset.c
> > +++ b/drivers/gpu/drm/drm_client_modeset.c
> > @@ -995,7 +995,7 @@ bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
> > }
> > EXPORT_SYMBOL(drm_client_rotation);
> >
> > -static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active, bool check)
> > +static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active)
> > {
> > struct drm_device *dev = client->dev;
> > struct drm_plane *plane;
> > @@ -1062,10 +1062,7 @@ static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool
> > }
> > }
> >
> > - if (check)
> > - ret = drm_atomic_check_only(state);
> > - else
> > - ret = drm_atomic_commit(state);
> > + ret = drm_atomic_commit(state);
> >
> > out_state:
> > if (ret == -EDEADLK)
> > @@ -1126,30 +1123,6 @@ static int drm_client_modeset_commit_legacy(struct drm_client_dev *client)
> > return ret;
> > }
> >
> > -/**
> > - * drm_client_modeset_check() - Check modeset configuration
> > - * @client: DRM client
> > - *
> > - * Check modeset configuration.
> > - *
> > - * Returns:
> > - * Zero on success or negative error code on failure.
> > - */
> > -int drm_client_modeset_check(struct drm_client_dev *client)
> > -{
> > - int ret;
> > -
> > - if (!drm_drv_uses_atomic_modeset(client->dev))
> > - return 0;
> > -
> > - mutex_lock(&client->modeset_mutex);
> > - ret = drm_client_modeset_commit_atomic(client, true, true);
> > - mutex_unlock(&client->modeset_mutex);
> > -
> > - return ret;
> > -}
> > -EXPORT_SYMBOL(drm_client_modeset_check);
> > -
> > /**
> > * drm_client_modeset_commit_locked() - Force commit CRTC configuration
> > * @client: DRM client
> > @@ -1168,7 +1141,7 @@ int drm_client_modeset_commit_locked(struct drm_client_dev *client)
> >
> > mutex_lock(&client->modeset_mutex);
> > if (drm_drv_uses_atomic_modeset(dev))
> > - ret = drm_client_modeset_commit_atomic(client, true, false);
> > + ret = drm_client_modeset_commit_atomic(client, true);
> > else
> > ret = drm_client_modeset_commit_legacy(client);
> > mutex_unlock(&client->modeset_mutex);
> > @@ -1246,7 +1219,7 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode)
> >
> > mutex_lock(&client->modeset_mutex);
> > if (drm_drv_uses_atomic_modeset(dev))
> > - ret = drm_client_modeset_commit_atomic(client, mode == DRM_MODE_DPMS_ON, false);
> > + ret = drm_client_modeset_commit_atomic(client, mode == DRM_MODE_DPMS_ON);
> > else
> > drm_client_modeset_dpms_legacy(client, mode);
> > mutex_unlock(&client->modeset_mutex);
> > diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
> > index bc0e66f9c425..ead3c3526ee3 100644
> > --- a/include/drm/drm_client.h
> > +++ b/include/drm/drm_client.h
> > @@ -177,7 +177,6 @@ int drm_client_modeset_create(struct drm_client_dev *client);
> > void drm_client_modeset_free(struct drm_client_dev *client);
> > int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height);
> > bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation);
> > -int drm_client_modeset_check(struct drm_client_dev *client);
> > int drm_client_modeset_commit_locked(struct drm_client_dev *client);
> > int drm_client_modeset_commit(struct drm_client_dev *client);
> > int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);
> > --
> > 2.47.0
> >
>
> --
> With best wishes
> Dmitry
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
prev parent reply other threads:[~2025-03-03 16:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 23:47 [PATCH v2 0/3] DRM deadcode linux
2024-10-29 23:47 ` [PATCH v2 1/3] drm: Remove unused drm_atomic_helper_commit_planes_on_crtc linux
2024-10-29 23:47 ` [PATCH v2 2/3] drm/sysfs: Remove unused drm_class_device_(un)register linux
2024-10-29 23:47 ` [PATCH v2 3/3] Revert "drm/client: Add drm_client_modeset_check()" linux
2024-10-31 21:47 ` Dmitry Baryshkov
2025-01-31 12:56 ` Dr. David Alan Gilbert
2025-03-03 16:58 ` Dr. David Alan Gilbert [this message]
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=Z8Xfst88r_M_RZ3v@gallifrey \
--to=linux@treblig.org \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@linux.intel.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.