diff options
author | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2014-03-11 18:14:06 -0400 |
---|---|---|
committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2014-03-17 15:14:01 -0400 |
commit | 19519943ef3ec49ae605e05ce3cafb099c4bb863 (patch) | |
tree | 52f22d4a8697afdbfa3ad45c476a5f1947e2ea13 | |
parent | f35257a3fe267c4280bb2f69453ca1dd3bf48956 (diff) |
drm/gma500: Unify encoder mode fixup
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_crt.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/gma_display.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/gma_display.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/oaktrail_hdmi.c | 9 |
5 files changed, 13 insertions, 24 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c index 661af492173d..c18268cd516e 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_crt.c +++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c | |||
@@ -81,13 +81,6 @@ static int cdv_intel_crt_mode_valid(struct drm_connector *connector, | |||
81 | return MODE_OK; | 81 | return MODE_OK; |
82 | } | 82 | } |
83 | 83 | ||
84 | static bool cdv_intel_crt_mode_fixup(struct drm_encoder *encoder, | ||
85 | const struct drm_display_mode *mode, | ||
86 | struct drm_display_mode *adjusted_mode) | ||
87 | { | ||
88 | return true; | ||
89 | } | ||
90 | |||
91 | static void cdv_intel_crt_mode_set(struct drm_encoder *encoder, | 84 | static void cdv_intel_crt_mode_set(struct drm_encoder *encoder, |
92 | struct drm_display_mode *mode, | 85 | struct drm_display_mode *mode, |
93 | struct drm_display_mode *adjusted_mode) | 86 | struct drm_display_mode *adjusted_mode) |
@@ -224,7 +217,7 @@ static int cdv_intel_crt_set_property(struct drm_connector *connector, | |||
224 | 217 | ||
225 | static const struct drm_encoder_helper_funcs cdv_intel_crt_helper_funcs = { | 218 | static const struct drm_encoder_helper_funcs cdv_intel_crt_helper_funcs = { |
226 | .dpms = cdv_intel_crt_dpms, | 219 | .dpms = cdv_intel_crt_dpms, |
227 | .mode_fixup = cdv_intel_crt_mode_fixup, | 220 | .mode_fixup = gma_encoder_mode_fixup, |
228 | .prepare = gma_encoder_prepare, | 221 | .prepare = gma_encoder_prepare, |
229 | .commit = gma_encoder_commit, | 222 | .commit = gma_encoder_commit, |
230 | .mode_set = cdv_intel_crt_mode_set, | 223 | .mode_set = cdv_intel_crt_mode_set, |
diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c index 1c0d723b8d24..968b42a5a32b 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c +++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c | |||
@@ -89,13 +89,6 @@ static void cdv_hdmi_mode_set(struct drm_encoder *encoder, | |||
89 | REG_READ(hdmi_priv->hdmi_reg); | 89 | REG_READ(hdmi_priv->hdmi_reg); |
90 | } | 90 | } |
91 | 91 | ||
92 | static bool cdv_hdmi_mode_fixup(struct drm_encoder *encoder, | ||
93 | const struct drm_display_mode *mode, | ||
94 | struct drm_display_mode *adjusted_mode) | ||
95 | { | ||
96 | return true; | ||
97 | } | ||
98 | |||
99 | static void cdv_hdmi_dpms(struct drm_encoder *encoder, int mode) | 92 | static void cdv_hdmi_dpms(struct drm_encoder *encoder, int mode) |
100 | { | 93 | { |
101 | struct drm_device *dev = encoder->dev; | 94 | struct drm_device *dev = encoder->dev; |
@@ -262,7 +255,7 @@ static void cdv_hdmi_destroy(struct drm_connector *connector) | |||
262 | 255 | ||
263 | static const struct drm_encoder_helper_funcs cdv_hdmi_helper_funcs = { | 256 | static const struct drm_encoder_helper_funcs cdv_hdmi_helper_funcs = { |
264 | .dpms = cdv_hdmi_dpms, | 257 | .dpms = cdv_hdmi_dpms, |
265 | .mode_fixup = cdv_hdmi_mode_fixup, | 258 | .mode_fixup = gma_encoder_mode_fixup, |
266 | .prepare = gma_encoder_prepare, | 259 | .prepare = gma_encoder_prepare, |
267 | .mode_set = cdv_hdmi_mode_set, | 260 | .mode_set = cdv_hdmi_mode_set, |
268 | .commit = gma_encoder_commit, | 261 | .commit = gma_encoder_commit, |
diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index 386de2c9dc86..d45476b72aad 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c | |||
@@ -485,6 +485,13 @@ int gma_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) | |||
485 | return 0; | 485 | return 0; |
486 | } | 486 | } |
487 | 487 | ||
488 | bool gma_encoder_mode_fixup(struct drm_encoder *encoder, | ||
489 | const struct drm_display_mode *mode, | ||
490 | struct drm_display_mode *adjusted_mode) | ||
491 | { | ||
492 | return true; | ||
493 | } | ||
494 | |||
488 | bool gma_crtc_mode_fixup(struct drm_crtc *crtc, | 495 | bool gma_crtc_mode_fixup(struct drm_crtc *crtc, |
489 | const struct drm_display_mode *mode, | 496 | const struct drm_display_mode *mode, |
490 | struct drm_display_mode *adjusted_mode) | 497 | struct drm_display_mode *adjusted_mode) |
diff --git a/drivers/gpu/drm/gma500/gma_display.h b/drivers/gpu/drm/gma500/gma_display.h index 78b9f986a6e5..ed569d8a6af3 100644 --- a/drivers/gpu/drm/gma500/gma_display.h +++ b/drivers/gpu/drm/gma500/gma_display.h | |||
@@ -90,6 +90,9 @@ extern void gma_crtc_restore(struct drm_crtc *crtc); | |||
90 | extern void gma_encoder_prepare(struct drm_encoder *encoder); | 90 | extern void gma_encoder_prepare(struct drm_encoder *encoder); |
91 | extern void gma_encoder_commit(struct drm_encoder *encoder); | 91 | extern void gma_encoder_commit(struct drm_encoder *encoder); |
92 | extern void gma_encoder_destroy(struct drm_encoder *encoder); | 92 | extern void gma_encoder_destroy(struct drm_encoder *encoder); |
93 | extern bool gma_encoder_mode_fixup(struct drm_encoder *encoder, | ||
94 | const struct drm_display_mode *mode, | ||
95 | struct drm_display_mode *adjusted_mode); | ||
93 | 96 | ||
94 | /* Common clock related functions */ | 97 | /* Common clock related functions */ |
95 | extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk); | 98 | extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk); |
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index 38153143ed8c..cf018ddcc5a6 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c | |||
@@ -523,13 +523,6 @@ static int oaktrail_hdmi_mode_valid(struct drm_connector *connector, | |||
523 | return MODE_OK; | 523 | return MODE_OK; |
524 | } | 524 | } |
525 | 525 | ||
526 | static bool oaktrail_hdmi_mode_fixup(struct drm_encoder *encoder, | ||
527 | const struct drm_display_mode *mode, | ||
528 | struct drm_display_mode *adjusted_mode) | ||
529 | { | ||
530 | return true; | ||
531 | } | ||
532 | |||
533 | static enum drm_connector_status | 526 | static enum drm_connector_status |
534 | oaktrail_hdmi_detect(struct drm_connector *connector, bool force) | 527 | oaktrail_hdmi_detect(struct drm_connector *connector, bool force) |
535 | { | 528 | { |
@@ -608,7 +601,7 @@ static void oaktrail_hdmi_destroy(struct drm_connector *connector) | |||
608 | 601 | ||
609 | static const struct drm_encoder_helper_funcs oaktrail_hdmi_helper_funcs = { | 602 | static const struct drm_encoder_helper_funcs oaktrail_hdmi_helper_funcs = { |
610 | .dpms = oaktrail_hdmi_dpms, | 603 | .dpms = oaktrail_hdmi_dpms, |
611 | .mode_fixup = oaktrail_hdmi_mode_fixup, | 604 | .mode_fixup = gma_encoder_mode_fixup, |
612 | .prepare = gma_encoder_prepare, | 605 | .prepare = gma_encoder_prepare, |
613 | .mode_set = oaktrail_hdmi_mode_set, | 606 | .mode_set = oaktrail_hdmi_mode_set, |
614 | .commit = gma_encoder_commit, | 607 | .commit = gma_encoder_commit, |