Hi Patrik Am 13.06.22 um 14:34 schrieb Patrik Jakobsson:
These now only contains generic gma functions so create gma_lvds_connector_helper_funcs that all chips can use. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx> --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 10 +--------- drivers/gpu/drm/gma500/gma_lvds.c | 12 +++++++++--- drivers/gpu/drm/gma500/gma_lvds.h | 4 +--- drivers/gpu/drm/gma500/oaktrail_lvds.c | 3 +-- drivers/gpu/drm/gma500/psb_intel_lvds.c | 10 +--------- 5 files changed, 13 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index a6f94572baaf..2ba635513401 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c @@ -111,13 +111,6 @@ static int cdv_intel_lvds_set_property(struct drm_connector *connector, return 0; }-static const struct drm_connector_helper_funcs- cdv_intel_lvds_connector_helper_funcs = { - .get_modes = gma_lvds_get_modes, - .mode_valid = gma_lvds_mode_valid, - .best_encoder = gma_best_encoder, -}; - static const struct drm_connector_funcs cdv_intel_lvds_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, @@ -253,8 +246,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, gma_encoder->type = INTEL_OUTPUT_LVDS;drm_encoder_helper_add(encoder, &gma_lvds_helper_funcs);- drm_connector_helper_add(connector, - &cdv_intel_lvds_connector_helper_funcs); + drm_connector_helper_add(connector, &gma_lvds_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB; connector->interlace_allowed = false; connector->doublescan_allowed = false; diff --git a/drivers/gpu/drm/gma500/gma_lvds.c b/drivers/gpu/drm/gma500/gma_lvds.c index 49c11b5337cb..3b48999105d1 100644 --- a/drivers/gpu/drm/gma500/gma_lvds.c +++ b/drivers/gpu/drm/gma500/gma_lvds.c @@ -94,8 +94,8 @@ static void gma_lvds_set_power(struct drm_device *dev, bool on) gma_power_end(dev); }-enum drm_mode_status gma_lvds_mode_valid(struct drm_connector *connector,- struct drm_display_mode *mode) +static enum drm_mode_status gma_lvds_mode_valid(struct drm_connector *connector, + struct drm_display_mode *mode) { struct drm_device *dev = connector->dev; struct drm_psb_private *dev_priv = to_drm_psb_private(dev); @@ -345,7 +345,7 @@ const struct drm_encoder_helper_funcs gma_lvds_helper_funcs = { /* * Return the list of DDC modes if available, or the BIOS fixed mode otherwise. */ -int gma_lvds_get_modes(struct drm_connector *connector) +static int gma_lvds_get_modes(struct drm_connector *connector) { struct drm_device *dev = connector->dev; struct drm_psb_private *dev_priv = to_drm_psb_private(dev); @@ -368,3 +368,9 @@ int gma_lvds_get_modes(struct drm_connector *connector) return 0; }+const struct drm_connector_helper_funcs gma_lvds_connector_helper_funcs = {+ .get_modes = gma_lvds_get_modes, + .mode_valid = gma_lvds_mode_valid, + .best_encoder = gma_best_encoder, +};
Same suggestion as for pathc 13. Best regards Thomas
+ diff --git a/drivers/gpu/drm/gma500/gma_lvds.h b/drivers/gpu/drm/gma500/gma_lvds.h index 70c416d8b7a7..5c7da22400fb 100644 --- a/drivers/gpu/drm/gma500/gma_lvds.h +++ b/drivers/gpu/drm/gma500/gma_lvds.h @@ -24,8 +24,6 @@ struct gma_lvds_priv { };u32 gma_lvds_get_max_backlight(struct drm_device *dev);-enum drm_mode_status gma_lvds_mode_valid(struct drm_connector *connector, - struct drm_display_mode *mode); void gma_lvds_encoder_dpms(struct drm_encoder *encoder, int mode); void gma_lvds_save(struct drm_connector *connector); void gma_lvds_restore(struct drm_connector *connector); @@ -34,8 +32,8 @@ bool gma_lvds_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *adjusted_mode); void gma_lvds_prepare(struct drm_encoder *encoder); void gma_lvds_commit(struct drm_encoder *encoder); -int gma_lvds_get_modes(struct drm_connector *connector);extern const struct drm_encoder_helper_funcs gma_lvds_helper_funcs;+extern const struct drm_connector_helper_funcs gma_lvds_connector_helper_funcs;#endifdiff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c index 85cab0f7028a..7724ebd71aa8 100644 --- a/drivers/gpu/drm/gma500/oaktrail_lvds.c +++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c @@ -230,8 +230,7 @@ void oaktrail_lvds_init(struct drm_device *dev, gma_encoder->type = INTEL_OUTPUT_LVDS;drm_encoder_helper_add(encoder, &oaktrail_lvds_helper_funcs);- drm_connector_helper_add(connector, - &psb_intel_lvds_connector_helper_funcs); + drm_connector_helper_add(connector, &gma_lvds_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB; connector->interlace_allowed = false; connector->doublescan_allowed = false; diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c index 4ef0150c6a03..f129e53f0233 100644 --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c @@ -210,13 +210,6 @@ int psb_intel_lvds_set_property(struct drm_connector *connector, return -1; }-const struct drm_connector_helper_funcs- psb_intel_lvds_connector_helper_funcs = { - .get_modes = gma_lvds_get_modes, - .mode_valid = gma_lvds_mode_valid, - .best_encoder = gma_best_encoder, -}; - const struct drm_connector_funcs psb_intel_lvds_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, @@ -296,8 +289,7 @@ void psb_intel_lvds_init(struct drm_device *dev, gma_encoder->type = INTEL_OUTPUT_LVDS;drm_encoder_helper_add(encoder, &gma_lvds_helper_funcs);- drm_connector_helper_add(connector, - &psb_intel_lvds_connector_helper_funcs); + drm_connector_helper_add(connector, &gma_lvds_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB; connector->interlace_allowed = false; connector->doublescan_allowed = false;
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature