Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/gma500: Unify encoder mode fixup

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

+13 -24
+1 -8
drivers/gpu/drm/gma500/cdv_intel_crt.c
··· 81 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 84 static void cdv_intel_crt_mode_set(struct drm_encoder *encoder, 92 85 struct drm_display_mode *mode, 93 86 struct drm_display_mode *adjusted_mode) ··· 217 224 218 225 static const struct drm_encoder_helper_funcs cdv_intel_crt_helper_funcs = { 219 226 .dpms = cdv_intel_crt_dpms, 220 - .mode_fixup = cdv_intel_crt_mode_fixup, 227 + .mode_fixup = gma_encoder_mode_fixup, 221 228 .prepare = gma_encoder_prepare, 222 229 .commit = gma_encoder_commit, 223 230 .mode_set = cdv_intel_crt_mode_set,
+1 -8
drivers/gpu/drm/gma500/cdv_intel_hdmi.c
··· 89 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 92 static void cdv_hdmi_dpms(struct drm_encoder *encoder, int mode) 100 93 { 101 94 struct drm_device *dev = encoder->dev; ··· 255 262 256 263 static const struct drm_encoder_helper_funcs cdv_hdmi_helper_funcs = { 257 264 .dpms = cdv_hdmi_dpms, 258 - .mode_fixup = cdv_hdmi_mode_fixup, 265 + .mode_fixup = gma_encoder_mode_fixup, 259 266 .prepare = gma_encoder_prepare, 260 267 .mode_set = cdv_hdmi_mode_set, 261 268 .commit = gma_encoder_commit,
+7
drivers/gpu/drm/gma500/gma_display.c
··· 485 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 495 bool gma_crtc_mode_fixup(struct drm_crtc *crtc, 489 496 const struct drm_display_mode *mode, 490 497 struct drm_display_mode *adjusted_mode)
+3
drivers/gpu/drm/gma500/gma_display.h
··· 90 90 extern void gma_encoder_prepare(struct drm_encoder *encoder); 91 91 extern void gma_encoder_commit(struct drm_encoder *encoder); 92 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 97 /* Common clock related functions */ 95 98 extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk);
+1 -8
drivers/gpu/drm/gma500/oaktrail_hdmi.c
··· 523 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 526 static enum drm_connector_status 534 527 oaktrail_hdmi_detect(struct drm_connector *connector, bool force) 535 528 { ··· 601 608 602 609 static const struct drm_encoder_helper_funcs oaktrail_hdmi_helper_funcs = { 603 610 .dpms = oaktrail_hdmi_dpms, 604 - .mode_fixup = oaktrail_hdmi_mode_fixup, 611 + .mode_fixup = gma_encoder_mode_fixup, 605 612 .prepare = gma_encoder_prepare, 606 613 .mode_set = oaktrail_hdmi_mode_set, 607 614 .commit = gma_encoder_commit,