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.
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/gpu/drm/drm_client_modeset.c | 24 ------------------------
include/drm/drm_client.h | 1 -
2 files changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index cee5eafbfb81..69e1ce4d18cd 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -1126,30 +1126,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
diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
index 560aae47e06d..e1fd32adb3e9 100644
--- a/include/drm/drm_client.h
+++ b/include/drm/drm_client.h
@@ -176,7 +176,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
On Wed, Oct 23, 2024 at 12:29:34AM +0100, 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.
>
> Remove it.
If you are removing it, it makes more sense to revert the mentioned
commit completely, dropping the third argument of
drm_client_modeset_commit_atomic().
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
> drivers/gpu/drm/drm_client_modeset.c | 24 ------------------------
> include/drm/drm_client.h | 1 -
> 2 files changed, 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> index cee5eafbfb81..69e1ce4d18cd 100644
> --- a/drivers/gpu/drm/drm_client_modeset.c
> +++ b/drivers/gpu/drm/drm_client_modeset.c
> @@ -1126,30 +1126,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
> diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
> index 560aae47e06d..e1fd32adb3e9 100644
> --- a/include/drm/drm_client.h
> +++ b/include/drm/drm_client.h
> @@ -176,7 +176,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
* Dmitry Baryshkov (dmitry.baryshkov@linaro.org) wrote:
> On Wed, Oct 23, 2024 at 12:29:34AM +0100, 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.
> >
> > Remove it.
>
> If you are removing it, it makes more sense to revert the mentioned
> commit completely, dropping the third argument of
> drm_client_modeset_commit_atomic().
Sure, I can look at that; and resend this series also without 4/5 which
people still wanted.
What about 3/5 - that's the only one that's not reviewed either way?
Dave
> >
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > ---
> > drivers/gpu/drm/drm_client_modeset.c | 24 ------------------------
> > include/drm/drm_client.h | 1 -
> > 2 files changed, 25 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> > index cee5eafbfb81..69e1ce4d18cd 100644
> > --- a/drivers/gpu/drm/drm_client_modeset.c
> > +++ b/drivers/gpu/drm/drm_client_modeset.c
> > @@ -1126,30 +1126,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
> > diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
> > index 560aae47e06d..e1fd32adb3e9 100644
> > --- a/include/drm/drm_client.h
> > +++ b/include/drm/drm_client.h
> > @@ -176,7 +176,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 |_______/
* Dr. David Alan Gilbert (linux@treblig.org) wrote:
> * Dmitry Baryshkov (dmitry.baryshkov@linaro.org) wrote:
> > On Wed, Oct 23, 2024 at 12:29:34AM +0100, 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.
> > >
> > > Remove it.
> >
> > If you are removing it, it makes more sense to revert the mentioned
> > commit completely, dropping the third argument of
> > drm_client_modeset_commit_atomic().
>
> Sure, I can look at that; and resend this series also without 4/5 which
> people still wanted.
> What about 3/5 - that's the only one that's not reviewed either way?
I've just sent the v2 with this as a revert and the contentious pair dropped.
Dave
> Dave
>
> > >
> > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > > ---
> > > drivers/gpu/drm/drm_client_modeset.c | 24 ------------------------
> > > include/drm/drm_client.h | 1 -
> > > 2 files changed, 25 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> > > index cee5eafbfb81..69e1ce4d18cd 100644
> > > --- a/drivers/gpu/drm/drm_client_modeset.c
> > > +++ b/drivers/gpu/drm/drm_client_modeset.c
> > > @@ -1126,30 +1126,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
> > > diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
> > > index 560aae47e06d..e1fd32adb3e9 100644
> > > --- a/include/drm/drm_client.h
> > > +++ b/include/drm/drm_client.h
> > > @@ -176,7 +176,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 |_______/
>
--
-----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 |_______/
© 2016 - 2026 Red Hat, Inc.