Hi Am 13.06.22 um 14:34 schrieb Patrik Jakobsson:
These now only contains generic drm/gma functions so create gma_lvds_connector_funcs that all chips can use. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx> --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 +-------- drivers/gpu/drm/gma500/gma_lvds.c | 15 +++++++++++---- drivers/gpu/drm/gma500/gma_lvds.h | 4 +--- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/psb_intel_lvds.c | 9 +-------- 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index ccb489d6795b..0b8f818ca9b5 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c @@ -39,13 +39,6 @@ #define PSB_BACKLIGHT_PWM_CTL_SHIFT (16) #define PSB_BACKLIGHT_PWM_POLARITY_BIT_CLEAR (0xFFFE)-static const struct drm_connector_funcs cdv_intel_lvds_connector_funcs = {- .dpms = drm_helper_connector_dpms, - .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = gma_lvds_set_property, - .destroy = gma_lvds_destroy, -}; - /* * Enumerate the child dev array parsed from VBT to check whether * the LVDS is present. @@ -160,7 +153,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, }ret = drm_connector_init_with_ddc(dev, connector,- &cdv_intel_lvds_connector_funcs, + &gma_lvds_connector_funcs, DRM_MODE_CONNECTOR_LVDS, &ddc_bus->base); if (ret) diff --git a/drivers/gpu/drm/gma500/gma_lvds.c b/drivers/gpu/drm/gma500/gma_lvds.c index e4278d26f811..612013baf7ad 100644 --- a/drivers/gpu/drm/gma500/gma_lvds.c +++ b/drivers/gpu/drm/gma500/gma_lvds.c @@ -374,7 +374,7 @@ const struct drm_connector_helper_funcs gma_lvds_connector_helper_funcs = { .best_encoder = gma_best_encoder, };-void gma_lvds_destroy(struct drm_connector *connector)+static void gma_lvds_destroy(struct drm_connector *connector) { struct gma_connector *gma_connector = to_gma_connector(connector); struct gma_encoder *gma_encoder = gma_attached_encoder(connector); @@ -389,9 +389,9 @@ void gma_lvds_destroy(struct drm_connector *connector) kfree(gma_connector); }-int gma_lvds_set_property(struct drm_connector *connector,- struct drm_property *property, - uint64_t value) +static int gma_lvds_set_property(struct drm_connector *connector, + struct drm_property *property, + uint64_t value) { struct drm_encoder *encoder = connector->encoder;@@ -453,3 +453,10 @@ int gma_lvds_set_property(struct drm_connector *connector,return 0; }+const struct drm_connector_funcs gma_lvds_connector_funcs = {+ .dpms = drm_helper_connector_dpms, + .fill_modes = drm_helper_probe_single_connector_modes, + .set_property = gma_lvds_set_property, + .destroy = gma_lvds_destroy, +};
Again, same suggestion as for patch 13.
+ diff --git a/drivers/gpu/drm/gma500/gma_lvds.h b/drivers/gpu/drm/gma500/gma_lvds.h index ea261a60e9ff..bcb2efa7a1b5 100644 --- a/drivers/gpu/drm/gma500/gma_lvds.h +++ b/drivers/gpu/drm/gma500/gma_lvds.h @@ -30,11 +30,9 @@ 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); -void gma_lvds_destroy(struct drm_connector *connector); -int gma_lvds_set_property(struct drm_connector *connector, - struct drm_property *property, uint64_t value);extern const struct drm_encoder_helper_funcs gma_lvds_helper_funcs;extern const struct drm_connector_helper_funcs gma_lvds_connector_helper_funcs; +extern const struct drm_connector_funcs gma_lvds_connector_funcs;#endifdiff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c index 7724ebd71aa8..ea2745116f92 100644 --- a/drivers/gpu/drm/gma500/oaktrail_lvds.c +++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c @@ -217,7 +217,7 @@ void oaktrail_lvds_init(struct drm_device *dev, encoder = &gma_encoder->base; dev_priv->is_lvds_on = true; ret = drm_connector_init(dev, connector, - &psb_intel_lvds_connector_funcs, + &gma_lvds_connector_funcs, DRM_MODE_CONNECTOR_LVDS); if (ret) goto err_free_connector; diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c index df2e770c660a..4d9b9b45525f 100644 --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c @@ -132,13 +132,6 @@ void psb_intel_lvds_set_brightness(struct drm_device *dev, int level) psb_lvds_pwm_set_brightness(dev, level); }-const struct drm_connector_funcs psb_intel_lvds_connector_funcs = {- .dpms = drm_helper_connector_dpms, - .fill_modes = drm_helper_probe_single_connector_modes, - .set_property = gma_lvds_set_property, - .destroy = gma_lvds_destroy, -}; - /** * psb_intel_lvds_init - setup LVDS connectors on this device * @dev: drm device @@ -197,7 +190,7 @@ void psb_intel_lvds_init(struct drm_device *dev, }ret = drm_connector_init_with_ddc(dev, connector,- &psb_intel_lvds_connector_funcs, + &gma_lvds_connector_funcs, DRM_MODE_CONNECTOR_LVDS, &ddc_bus->base); if (ret)
-- 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