[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1587974717-14599-1-git-send-email-michalorzel.eng@gmail.com>
Date: Mon, 27 Apr 2020 10:05:17 +0200
From: Michal Orzel <michalorzel.eng@...il.com>
To: maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...ux.ie, daniel@...ll.ch,
jani.nikula@...ux.intel.com, joonas.lahtinen@...ux.intel.com,
rodrigo.vivi@...el.com, ville.syrjala@...ux.intel.com,
chris@...is-wilson.co.uk, jose.souza@...el.com
Cc: Michal Orzel <michalorzel.eng@...il.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
intel-gfx@...ts.freedesktop.org
Subject: [PATCH] Remove drm_display_mode.hsync
As suggested by the TODO list of DRM subsystem:
-remove the member hsync of drm_display_mode
-convert code using hsync member to use drm_mode_hsync()
Signed-off-by: Michal Orzel <michalorzel.eng@...il.com>
---
drivers/gpu/drm/drm_modes.c | 6 +-----
drivers/gpu/drm/i915/display/intel_display.c | 1 -
include/drm/drm_modes.h | 10 ----------
3 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index d4d6451..0340079 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -752,16 +752,12 @@ EXPORT_SYMBOL(drm_mode_set_name);
* @mode: mode
*
* Returns:
- * @modes's hsync rate in kHz, rounded to the nearest integer. Calculates the
- * value first if it is not yet set.
+ * @modes's hsync rate in kHz, rounded to the nearest integer.
*/
int drm_mode_hsync(const struct drm_display_mode *mode)
{
unsigned int calc_val;
- if (mode->hsync)
- return mode->hsync;
-
if (mode->htotal <= 0)
return 0;
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 3468466..ec7e943 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8891,7 +8891,6 @@ void intel_mode_from_pipe_config(struct drm_display_mode *mode,
mode->clock = pipe_config->hw.adjusted_mode.crtc_clock;
- mode->hsync = drm_mode_hsync(mode);
mode->vrefresh = drm_mode_vrefresh(mode);
drm_mode_set_name(mode);
}
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index 99134d4..7dab7f1 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -391,16 +391,6 @@ struct drm_display_mode {
int vrefresh;
/**
- * @hsync:
- *
- * Horizontal refresh rate, for debug output in human readable form. Not
- * used in a functional way.
- *
- * This value is in kHz.
- */
- int hsync;
-
- /**
* @picture_aspect_ratio:
*
* Field for setting the HDMI picture aspect ratio of a mode.
--
2.7.4
Powered by blists - more mailing lists