The dp->panel_is_modeset is now a write-only field. Drop it completely.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +----------
drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 1 -
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 82dc4b01806f9728dc882b0128171838e81f21b0..704c6169116eb2601d2ad02dc7294455ceff5460 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -964,9 +964,7 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp)
* is false, the panel will be unprepared.
*
* The function will disregard the current state
- * of the panel and either prepare/unprepare the panel based on @prepare. Once
- * it finishes, it will update dp->panel_is_modeset to reflect the current state
- * of the panel.
+ * of the panel and either prepare/unprepare the panel based on @prepare.
*/
static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
bool prepare)
@@ -983,12 +981,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
else
ret = drm_panel_unprepare(dp->plat_data->panel);
- if (ret)
- goto out;
-
- dp->panel_is_modeset = prepare;
-
-out:
mutex_unlock(&dp->panel_lock);
return ret;
}
@@ -1532,7 +1524,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
dp->dpms_mode = DRM_MODE_DPMS_OFF;
mutex_init(&dp->panel_lock);
- dp->panel_is_modeset = false;
/*
* platform dp driver need containor_of the plat_data to get
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
index 774d11574b095b093ddf2818ad5b84be6605c9bf..b679d5b71d276f458d905c936160f107225bc6c5 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
@@ -170,7 +170,6 @@ struct analogix_dp_device {
bool psr_supported;
struct mutex panel_lock;
- bool panel_is_modeset;
struct analogix_dp_plat_data *plat_data;
};
--
2.39.5
On 01/04/2025 07:11, Dmitry Baryshkov wrote:
> The dp->panel_is_modeset is now a write-only field. Drop it completely.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +----------
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 1 -
> 2 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 82dc4b01806f9728dc882b0128171838e81f21b0..704c6169116eb2601d2ad02dc7294455ceff5460 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -964,9 +964,7 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp)
> * is false, the panel will be unprepared.
> *
> * The function will disregard the current state
> - * of the panel and either prepare/unprepare the panel based on @prepare. Once
> - * it finishes, it will update dp->panel_is_modeset to reflect the current state
> - * of the panel.
> + * of the panel and either prepare/unprepare the panel based on @prepare.
> */
> static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> bool prepare)
> @@ -983,12 +981,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> else
> ret = drm_panel_unprepare(dp->plat_data->panel);
>
> - if (ret)
> - goto out;
> -
> - dp->panel_is_modeset = prepare;
> -
> -out:
> mutex_unlock(&dp->panel_lock);
> return ret;
> }
> @@ -1532,7 +1524,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
> dp->dpms_mode = DRM_MODE_DPMS_OFF;
>
> mutex_init(&dp->panel_lock);
> - dp->panel_is_modeset = false;
>
> /*
> * platform dp driver need containor_of the plat_data to get
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> index 774d11574b095b093ddf2818ad5b84be6605c9bf..b679d5b71d276f458d905c936160f107225bc6c5 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> @@ -170,7 +170,6 @@ struct analogix_dp_device {
> bool psr_supported;
>
> struct mutex panel_lock;
> - bool panel_is_modeset;
>
> struct analogix_dp_plat_data *plat_data;
> };
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
On 01/04/2025 07:11, Dmitry Baryshkov wrote:
> The dp->panel_is_modeset is now a write-only field. Drop it completely.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +----------
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 1 -
> 2 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 82dc4b01806f9728dc882b0128171838e81f21b0..704c6169116eb2601d2ad02dc7294455ceff5460 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -964,9 +964,7 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp)
> * is false, the panel will be unprepared.
> *
> * The function will disregard the current state
> - * of the panel and either prepare/unprepare the panel based on @prepare. Once
> - * it finishes, it will update dp->panel_is_modeset to reflect the current state
> - * of the panel.
> + * of the panel and either prepare/unprepare the panel based on @prepare.
> */
> static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> bool prepare)
> @@ -983,12 +981,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> else
> ret = drm_panel_unprepare(dp->plat_data->panel);
>
> - if (ret)
> - goto out;
> -
> - dp->panel_is_modeset = prepare;
> -
> -out:
> mutex_unlock(&dp->panel_lock);
> return ret;
> }
> @@ -1532,7 +1524,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
> dp->dpms_mode = DRM_MODE_DPMS_OFF;
>
> mutex_init(&dp->panel_lock);
> - dp->panel_is_modeset = false;
>
> /*
> * platform dp driver need containor_of the plat_data to get
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> index 774d11574b095b093ddf2818ad5b84be6605c9bf..b679d5b71d276f458d905c936160f107225bc6c5 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> @@ -170,7 +170,6 @@ struct analogix_dp_device {
> bool psr_supported;
>
> struct mutex panel_lock;
> - bool panel_is_modeset;
>
> struct analogix_dp_plat_data *plat_data;
> };
>
On Thu, Apr 17, 2025 at 05:47:00PM +0200, Neil Armstrong wrote: > On 01/04/2025 07:11, Dmitry Baryshkov wrote: > > The dp->panel_is_modeset is now a write-only field. Drop it completely. > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Neil, it looks like you wanted to respond with either a comment or an r-b tag, but none were present in the email... > > --- > > drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +---------- > > drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 1 - > > 2 files changed, 1 insertion(+), 11 deletions(-) > > -- With best wishes Dmitry
Hi Dmitry,
On 2025/4/1 13:11, Dmitry Baryshkov wrote:
> The dp->panel_is_modeset is now a write-only field. Drop it completely.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +----------
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 1 -
> 2 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 82dc4b01806f9728dc882b0128171838e81f21b0..704c6169116eb2601d2ad02dc7294455ceff5460 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -964,9 +964,7 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp)
> * is false, the panel will be unprepared.
> *
> * The function will disregard the current state
> - * of the panel and either prepare/unprepare the panel based on @prepare. Once
> - * it finishes, it will update dp->panel_is_modeset to reflect the current state
> - * of the panel.
> + * of the panel and either prepare/unprepare the panel based on @prepare.
> */
> static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> bool prepare)
> @@ -983,12 +981,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
> else
> ret = drm_panel_unprepare(dp->plat_data->panel);
>
> - if (ret)
> - goto out;
> -
> - dp->panel_is_modeset = prepare;
> -
> -out:
> mutex_unlock(&dp->panel_lock);
> return ret;
> }
> @@ -1532,7 +1524,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
> dp->dpms_mode = DRM_MODE_DPMS_OFF;
>
> mutex_init(&dp->panel_lock);
> - dp->panel_is_modeset = false;
>
> /*
> * platform dp driver need containor_of the plat_data to get
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> index 774d11574b095b093ddf2818ad5b84be6605c9bf..b679d5b71d276f458d905c936160f107225bc6c5 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
> @@ -170,7 +170,6 @@ struct analogix_dp_device {
> bool psr_supported;
>
> struct mutex panel_lock;
> - bool panel_is_modeset;
>
> struct analogix_dp_plat_data *plat_data;
> };
>
The patch has been verified with the eDP panel "lg,lp079qx1-sp0v" in
RK3588S EVB1 board.
Tested-by: Damon Ding <damon.ding@rock-chips.com>
Best regards,
Damon
© 2016 - 2025 Red Hat, Inc.