diff options
author | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-07-22 11:05:25 -0400 |
---|---|---|
committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-07-23 19:47:34 -0400 |
commit | a3d5d75f694396aa574c4dadbd6008e2cc9a2bbb (patch) | |
tree | 0b68977d048059f0561d578332691311c143be1c /drivers/gpu/drm/gma500 | |
parent | 6306865daf0283d1b13adea8be8d1ad4dd0ea1c3 (diff) |
drm/gma500: Rename psb_intel_connector to gma_connector
The psb_intel_connector is generic and should be named appropriately
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_crt.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_dp.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_lvds.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/gma_display.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/mdfld_dsi_output.h | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/oaktrail_hdmi.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/oaktrail_lvds.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_display.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_drv.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_lvds.c | 15 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_sdvo.c | 12 |
14 files changed, 64 insertions, 65 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c index 79ad19696f71..b2661f3a3047 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_crt.c +++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c | |||
@@ -259,7 +259,7 @@ void cdv_intel_crt_init(struct drm_device *dev, | |||
259 | struct psb_intel_mode_device *mode_dev) | 259 | struct psb_intel_mode_device *mode_dev) |
260 | { | 260 | { |
261 | 261 | ||
262 | struct psb_intel_connector *psb_intel_connector; | 262 | struct gma_connector *gma_connector; |
263 | struct psb_intel_encoder *psb_intel_encoder; | 263 | struct psb_intel_encoder *psb_intel_encoder; |
264 | struct drm_connector *connector; | 264 | struct drm_connector *connector; |
265 | struct drm_encoder *encoder; | 265 | struct drm_encoder *encoder; |
@@ -270,11 +270,11 @@ void cdv_intel_crt_init(struct drm_device *dev, | |||
270 | if (!psb_intel_encoder) | 270 | if (!psb_intel_encoder) |
271 | return; | 271 | return; |
272 | 272 | ||
273 | psb_intel_connector = kzalloc(sizeof(struct psb_intel_connector), GFP_KERNEL); | 273 | gma_connector = kzalloc(sizeof(struct gma_connector), GFP_KERNEL); |
274 | if (!psb_intel_connector) | 274 | if (!gma_connector) |
275 | goto failed_connector; | 275 | goto failed_connector; |
276 | 276 | ||
277 | connector = &psb_intel_connector->base; | 277 | connector = &gma_connector->base; |
278 | connector->polled = DRM_CONNECTOR_POLL_HPD; | 278 | connector->polled = DRM_CONNECTOR_POLL_HPD; |
279 | drm_connector_init(dev, connector, | 279 | drm_connector_init(dev, connector, |
280 | &cdv_intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA); | 280 | &cdv_intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA); |
@@ -283,7 +283,7 @@ void cdv_intel_crt_init(struct drm_device *dev, | |||
283 | drm_encoder_init(dev, encoder, | 283 | drm_encoder_init(dev, encoder, |
284 | &cdv_intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC); | 284 | &cdv_intel_crt_enc_funcs, DRM_MODE_ENCODER_DAC); |
285 | 285 | ||
286 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 286 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
287 | 287 | ||
288 | /* Set up the DDC bus. */ | 288 | /* Set up the DDC bus. */ |
289 | i2c_reg = GPIOA; | 289 | i2c_reg = GPIOA; |
@@ -317,8 +317,8 @@ void cdv_intel_crt_init(struct drm_device *dev, | |||
317 | return; | 317 | return; |
318 | failed_ddc: | 318 | failed_ddc: |
319 | drm_encoder_cleanup(&psb_intel_encoder->base); | 319 | drm_encoder_cleanup(&psb_intel_encoder->base); |
320 | drm_connector_cleanup(&psb_intel_connector->base); | 320 | drm_connector_cleanup(&gma_connector->base); |
321 | kfree(psb_intel_connector); | 321 | kfree(gma_connector); |
322 | failed_connector: | 322 | failed_connector: |
323 | kfree(psb_intel_encoder); | 323 | kfree(psb_intel_encoder); |
324 | return; | 324 | return; |
diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c index a90adf629925..55de663c50b5 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_dp.c +++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c | |||
@@ -648,7 +648,7 @@ cdv_intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, | |||
648 | } | 648 | } |
649 | 649 | ||
650 | static int | 650 | static int |
651 | cdv_intel_dp_i2c_init(struct psb_intel_connector *connector, struct psb_intel_encoder *encoder, const char *name) | 651 | cdv_intel_dp_i2c_init(struct gma_connector *connector, struct psb_intel_encoder *encoder, const char *name) |
652 | { | 652 | { |
653 | struct cdv_intel_dp *intel_dp = encoder->dev_priv; | 653 | struct cdv_intel_dp *intel_dp = encoder->dev_priv; |
654 | int ret; | 654 | int ret; |
@@ -1803,7 +1803,7 @@ void | |||
1803 | cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev, int output_reg) | 1803 | cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev, int output_reg) |
1804 | { | 1804 | { |
1805 | struct psb_intel_encoder *psb_intel_encoder; | 1805 | struct psb_intel_encoder *psb_intel_encoder; |
1806 | struct psb_intel_connector *psb_intel_connector; | 1806 | struct gma_connector *gma_connector; |
1807 | struct drm_connector *connector; | 1807 | struct drm_connector *connector; |
1808 | struct drm_encoder *encoder; | 1808 | struct drm_encoder *encoder; |
1809 | struct cdv_intel_dp *intel_dp; | 1809 | struct cdv_intel_dp *intel_dp; |
@@ -1813,8 +1813,8 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev | |||
1813 | psb_intel_encoder = kzalloc(sizeof(struct psb_intel_encoder), GFP_KERNEL); | 1813 | psb_intel_encoder = kzalloc(sizeof(struct psb_intel_encoder), GFP_KERNEL); |
1814 | if (!psb_intel_encoder) | 1814 | if (!psb_intel_encoder) |
1815 | return; | 1815 | return; |
1816 | psb_intel_connector = kzalloc(sizeof(struct psb_intel_connector), GFP_KERNEL); | 1816 | gma_connector = kzalloc(sizeof(struct gma_connector), GFP_KERNEL); |
1817 | if (!psb_intel_connector) | 1817 | if (!gma_connector) |
1818 | goto err_connector; | 1818 | goto err_connector; |
1819 | intel_dp = kzalloc(sizeof(struct cdv_intel_dp), GFP_KERNEL); | 1819 | intel_dp = kzalloc(sizeof(struct cdv_intel_dp), GFP_KERNEL); |
1820 | if (!intel_dp) | 1820 | if (!intel_dp) |
@@ -1823,13 +1823,13 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev | |||
1823 | if ((output_reg == DP_C) && cdv_intel_dpc_is_edp(dev)) | 1823 | if ((output_reg == DP_C) && cdv_intel_dpc_is_edp(dev)) |
1824 | type = DRM_MODE_CONNECTOR_eDP; | 1824 | type = DRM_MODE_CONNECTOR_eDP; |
1825 | 1825 | ||
1826 | connector = &psb_intel_connector->base; | 1826 | connector = &gma_connector->base; |
1827 | encoder = &psb_intel_encoder->base; | 1827 | encoder = &psb_intel_encoder->base; |
1828 | 1828 | ||
1829 | drm_connector_init(dev, connector, &cdv_intel_dp_connector_funcs, type); | 1829 | drm_connector_init(dev, connector, &cdv_intel_dp_connector_funcs, type); |
1830 | drm_encoder_init(dev, encoder, &cdv_intel_dp_enc_funcs, DRM_MODE_ENCODER_TMDS); | 1830 | drm_encoder_init(dev, encoder, &cdv_intel_dp_enc_funcs, DRM_MODE_ENCODER_TMDS); |
1831 | 1831 | ||
1832 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 1832 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
1833 | 1833 | ||
1834 | if (type == DRM_MODE_CONNECTOR_DisplayPort) | 1834 | if (type == DRM_MODE_CONNECTOR_DisplayPort) |
1835 | psb_intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; | 1835 | psb_intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; |
@@ -1864,7 +1864,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev | |||
1864 | 1864 | ||
1865 | cdv_disable_intel_clock_gating(dev); | 1865 | cdv_disable_intel_clock_gating(dev); |
1866 | 1866 | ||
1867 | cdv_intel_dp_i2c_init(psb_intel_connector, psb_intel_encoder, name); | 1867 | cdv_intel_dp_i2c_init(gma_connector, psb_intel_encoder, name); |
1868 | /* FIXME:fail check */ | 1868 | /* FIXME:fail check */ |
1869 | cdv_intel_dp_add_properties(connector); | 1869 | cdv_intel_dp_add_properties(connector); |
1870 | 1870 | ||
@@ -1947,7 +1947,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev | |||
1947 | return; | 1947 | return; |
1948 | 1948 | ||
1949 | err_priv: | 1949 | err_priv: |
1950 | kfree(psb_intel_connector); | 1950 | kfree(gma_connector); |
1951 | err_connector: | 1951 | err_connector: |
1952 | kfree(psb_intel_encoder); | 1952 | kfree(psb_intel_encoder); |
1953 | } | 1953 | } |
diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c index 5c3b3eabb5e9..b1290c303a58 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c +++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c | |||
@@ -295,7 +295,7 @@ void cdv_hdmi_init(struct drm_device *dev, | |||
295 | struct psb_intel_mode_device *mode_dev, int reg) | 295 | struct psb_intel_mode_device *mode_dev, int reg) |
296 | { | 296 | { |
297 | struct psb_intel_encoder *psb_intel_encoder; | 297 | struct psb_intel_encoder *psb_intel_encoder; |
298 | struct psb_intel_connector *psb_intel_connector; | 298 | struct gma_connector *gma_connector; |
299 | struct drm_connector *connector; | 299 | struct drm_connector *connector; |
300 | struct drm_encoder *encoder; | 300 | struct drm_encoder *encoder; |
301 | struct mid_intel_hdmi_priv *hdmi_priv; | 301 | struct mid_intel_hdmi_priv *hdmi_priv; |
@@ -307,10 +307,10 @@ void cdv_hdmi_init(struct drm_device *dev, | |||
307 | if (!psb_intel_encoder) | 307 | if (!psb_intel_encoder) |
308 | return; | 308 | return; |
309 | 309 | ||
310 | psb_intel_connector = kzalloc(sizeof(struct psb_intel_connector), | 310 | gma_connector = kzalloc(sizeof(struct gma_connector), |
311 | GFP_KERNEL); | 311 | GFP_KERNEL); |
312 | 312 | ||
313 | if (!psb_intel_connector) | 313 | if (!gma_connector) |
314 | goto err_connector; | 314 | goto err_connector; |
315 | 315 | ||
316 | hdmi_priv = kzalloc(sizeof(struct mid_intel_hdmi_priv), GFP_KERNEL); | 316 | hdmi_priv = kzalloc(sizeof(struct mid_intel_hdmi_priv), GFP_KERNEL); |
@@ -318,7 +318,7 @@ void cdv_hdmi_init(struct drm_device *dev, | |||
318 | if (!hdmi_priv) | 318 | if (!hdmi_priv) |
319 | goto err_priv; | 319 | goto err_priv; |
320 | 320 | ||
321 | connector = &psb_intel_connector->base; | 321 | connector = &gma_connector->base; |
322 | connector->polled = DRM_CONNECTOR_POLL_HPD; | 322 | connector->polled = DRM_CONNECTOR_POLL_HPD; |
323 | encoder = &psb_intel_encoder->base; | 323 | encoder = &psb_intel_encoder->base; |
324 | drm_connector_init(dev, connector, | 324 | drm_connector_init(dev, connector, |
@@ -328,7 +328,7 @@ void cdv_hdmi_init(struct drm_device *dev, | |||
328 | drm_encoder_init(dev, encoder, &psb_intel_lvds_enc_funcs, | 328 | drm_encoder_init(dev, encoder, &psb_intel_lvds_enc_funcs, |
329 | DRM_MODE_ENCODER_TMDS); | 329 | DRM_MODE_ENCODER_TMDS); |
330 | 330 | ||
331 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 331 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
332 | psb_intel_encoder->type = INTEL_OUTPUT_HDMI; | 332 | psb_intel_encoder->type = INTEL_OUTPUT_HDMI; |
333 | hdmi_priv->hdmi_reg = reg; | 333 | hdmi_priv->hdmi_reg = reg; |
334 | hdmi_priv->has_hdmi_sink = false; | 334 | hdmi_priv->has_hdmi_sink = false; |
@@ -378,7 +378,7 @@ failed_ddc: | |||
378 | drm_encoder_cleanup(encoder); | 378 | drm_encoder_cleanup(encoder); |
379 | drm_connector_cleanup(connector); | 379 | drm_connector_cleanup(connector); |
380 | err_priv: | 380 | err_priv: |
381 | kfree(psb_intel_connector); | 381 | kfree(gma_connector); |
382 | err_connector: | 382 | err_connector: |
383 | kfree(psb_intel_encoder); | 383 | kfree(psb_intel_encoder); |
384 | } | 384 | } |
diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index 53f1d8f5e9cd..f4693ebfc098 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c | |||
@@ -611,7 +611,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
611 | struct psb_intel_mode_device *mode_dev) | 611 | struct psb_intel_mode_device *mode_dev) |
612 | { | 612 | { |
613 | struct psb_intel_encoder *psb_intel_encoder; | 613 | struct psb_intel_encoder *psb_intel_encoder; |
614 | struct psb_intel_connector *psb_intel_connector; | 614 | struct gma_connector *gma_connector; |
615 | struct cdv_intel_lvds_priv *lvds_priv; | 615 | struct cdv_intel_lvds_priv *lvds_priv; |
616 | struct drm_connector *connector; | 616 | struct drm_connector *connector; |
617 | struct drm_encoder *encoder; | 617 | struct drm_encoder *encoder; |
@@ -633,9 +633,9 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
633 | if (!psb_intel_encoder) | 633 | if (!psb_intel_encoder) |
634 | return; | 634 | return; |
635 | 635 | ||
636 | psb_intel_connector = kzalloc(sizeof(struct psb_intel_connector), | 636 | gma_connector = kzalloc(sizeof(struct gma_connector), |
637 | GFP_KERNEL); | 637 | GFP_KERNEL); |
638 | if (!psb_intel_connector) | 638 | if (!gma_connector) |
639 | goto failed_connector; | 639 | goto failed_connector; |
640 | 640 | ||
641 | lvds_priv = kzalloc(sizeof(struct cdv_intel_lvds_priv), GFP_KERNEL); | 641 | lvds_priv = kzalloc(sizeof(struct cdv_intel_lvds_priv), GFP_KERNEL); |
@@ -644,7 +644,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
644 | 644 | ||
645 | psb_intel_encoder->dev_priv = lvds_priv; | 645 | psb_intel_encoder->dev_priv = lvds_priv; |
646 | 646 | ||
647 | connector = &psb_intel_connector->base; | 647 | connector = &gma_connector->base; |
648 | encoder = &psb_intel_encoder->base; | 648 | encoder = &psb_intel_encoder->base; |
649 | 649 | ||
650 | 650 | ||
@@ -657,7 +657,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
657 | DRM_MODE_ENCODER_LVDS); | 657 | DRM_MODE_ENCODER_LVDS); |
658 | 658 | ||
659 | 659 | ||
660 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 660 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
661 | psb_intel_encoder->type = INTEL_OUTPUT_LVDS; | 661 | psb_intel_encoder->type = INTEL_OUTPUT_LVDS; |
662 | 662 | ||
663 | drm_encoder_helper_add(encoder, &cdv_intel_lvds_helper_funcs); | 663 | drm_encoder_helper_add(encoder, &cdv_intel_lvds_helper_funcs); |
@@ -791,7 +791,7 @@ failed_blc_i2c: | |||
791 | drm_connector_cleanup(connector); | 791 | drm_connector_cleanup(connector); |
792 | kfree(lvds_priv); | 792 | kfree(lvds_priv); |
793 | failed_lvds_priv: | 793 | failed_lvds_priv: |
794 | kfree(psb_intel_connector); | 794 | kfree(gma_connector); |
795 | failed_connector: | 795 | failed_connector: |
796 | kfree(psb_intel_encoder); | 796 | kfree(psb_intel_encoder); |
797 | } | 797 | } |
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 6ebabb5ca3c2..bdc63c6ec5b8 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
@@ -744,7 +744,7 @@ static void psb_setup_outputs(struct drm_device *dev) | |||
744 | } | 744 | } |
745 | encoder->possible_crtcs = crtc_mask; | 745 | encoder->possible_crtcs = crtc_mask; |
746 | encoder->possible_clones = | 746 | encoder->possible_clones = |
747 | psb_intel_connector_clones(dev, clone_mask); | 747 | gma_connector_clones(dev, clone_mask); |
748 | } | 748 | } |
749 | } | 749 | } |
750 | 750 | ||
diff --git a/drivers/gpu/drm/gma500/framebuffer.h b/drivers/gpu/drm/gma500/framebuffer.h index 989558a9e6ee..395f20b07aab 100644 --- a/drivers/gpu/drm/gma500/framebuffer.h +++ b/drivers/gpu/drm/gma500/framebuffer.h | |||
@@ -41,7 +41,7 @@ struct psb_fbdev { | |||
41 | 41 | ||
42 | #define to_psb_fb(x) container_of(x, struct psb_framebuffer, base) | 42 | #define to_psb_fb(x) container_of(x, struct psb_framebuffer, base) |
43 | 43 | ||
44 | extern int psb_intel_connector_clones(struct drm_device *dev, int type_mask); | 44 | extern int gma_connector_clones(struct drm_device *dev, int type_mask); |
45 | 45 | ||
46 | #endif | 46 | #endif |
47 | 47 | ||
diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index b87180344ad6..eb460759f5d3 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c | |||
@@ -672,7 +672,7 @@ struct drm_encoder *gma_best_encoder(struct drm_connector *connector) | |||
672 | return &psb_intel_encoder->base; | 672 | return &psb_intel_encoder->base; |
673 | } | 673 | } |
674 | 674 | ||
675 | void gma_connector_attach_encoder(struct psb_intel_connector *connector, | 675 | void gma_connector_attach_encoder(struct gma_connector *connector, |
676 | struct psb_intel_encoder *encoder) | 676 | struct psb_intel_encoder *encoder) |
677 | { | 677 | { |
678 | connector->encoder = encoder; | 678 | connector->encoder = encoder; |
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.h b/drivers/gpu/drm/gma500/mdfld_dsi_output.h index 36eb0744841c..d78b108e3f3a 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.h +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.h | |||
@@ -227,7 +227,7 @@ enum { | |||
227 | #define DSI_DPI_DISABLE_BTA BIT(3) | 227 | #define DSI_DPI_DISABLE_BTA BIT(3) |
228 | 228 | ||
229 | struct mdfld_dsi_connector { | 229 | struct mdfld_dsi_connector { |
230 | struct psb_intel_connector base; | 230 | struct gma_connector base; |
231 | 231 | ||
232 | int pipe; | 232 | int pipe; |
233 | void *private; | 233 | void *private; |
@@ -269,11 +269,11 @@ struct mdfld_dsi_config { | |||
269 | static inline struct mdfld_dsi_connector *mdfld_dsi_connector( | 269 | static inline struct mdfld_dsi_connector *mdfld_dsi_connector( |
270 | struct drm_connector *connector) | 270 | struct drm_connector *connector) |
271 | { | 271 | { |
272 | struct psb_intel_connector *psb_connector; | 272 | struct gma_connector *gma_connector; |
273 | 273 | ||
274 | psb_connector = to_psb_intel_connector(connector); | 274 | gma_connector = to_gma_connector(connector); |
275 | 275 | ||
276 | return container_of(psb_connector, struct mdfld_dsi_connector, base); | 276 | return container_of(gma_connector, struct mdfld_dsi_connector, base); |
277 | } | 277 | } |
278 | 278 | ||
279 | static inline struct mdfld_dsi_encoder *mdfld_dsi_encoder( | 279 | static inline struct mdfld_dsi_encoder *mdfld_dsi_encoder( |
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index 059de197c942..846817fe95ce 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c | |||
@@ -641,7 +641,7 @@ void oaktrail_hdmi_init(struct drm_device *dev, | |||
641 | struct psb_intel_mode_device *mode_dev) | 641 | struct psb_intel_mode_device *mode_dev) |
642 | { | 642 | { |
643 | struct psb_intel_encoder *psb_intel_encoder; | 643 | struct psb_intel_encoder *psb_intel_encoder; |
644 | struct psb_intel_connector *psb_intel_connector; | 644 | struct gma_connector *gma_connector; |
645 | struct drm_connector *connector; | 645 | struct drm_connector *connector; |
646 | struct drm_encoder *encoder; | 646 | struct drm_encoder *encoder; |
647 | 647 | ||
@@ -649,11 +649,11 @@ void oaktrail_hdmi_init(struct drm_device *dev, | |||
649 | if (!psb_intel_encoder) | 649 | if (!psb_intel_encoder) |
650 | return; | 650 | return; |
651 | 651 | ||
652 | psb_intel_connector = kzalloc(sizeof(struct psb_intel_connector), GFP_KERNEL); | 652 | gma_connector = kzalloc(sizeof(struct gma_connector), GFP_KERNEL); |
653 | if (!psb_intel_connector) | 653 | if (!gma_connector) |
654 | goto failed_connector; | 654 | goto failed_connector; |
655 | 655 | ||
656 | connector = &psb_intel_connector->base; | 656 | connector = &gma_connector->base; |
657 | encoder = &psb_intel_encoder->base; | 657 | encoder = &psb_intel_encoder->base; |
658 | drm_connector_init(dev, connector, | 658 | drm_connector_init(dev, connector, |
659 | &oaktrail_hdmi_connector_funcs, | 659 | &oaktrail_hdmi_connector_funcs, |
@@ -663,7 +663,7 @@ void oaktrail_hdmi_init(struct drm_device *dev, | |||
663 | &oaktrail_hdmi_enc_funcs, | 663 | &oaktrail_hdmi_enc_funcs, |
664 | DRM_MODE_ENCODER_TMDS); | 664 | DRM_MODE_ENCODER_TMDS); |
665 | 665 | ||
666 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 666 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
667 | 667 | ||
668 | psb_intel_encoder->type = INTEL_OUTPUT_HDMI; | 668 | psb_intel_encoder->type = INTEL_OUTPUT_HDMI; |
669 | drm_encoder_helper_add(encoder, &oaktrail_hdmi_helper_funcs); | 669 | drm_encoder_helper_add(encoder, &oaktrail_hdmi_helper_funcs); |
diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c index 7b1cfd6d1606..9d037720eb9a 100644 --- a/drivers/gpu/drm/gma500/oaktrail_lvds.c +++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c | |||
@@ -326,7 +326,7 @@ void oaktrail_lvds_init(struct drm_device *dev, | |||
326 | struct psb_intel_mode_device *mode_dev) | 326 | struct psb_intel_mode_device *mode_dev) |
327 | { | 327 | { |
328 | struct psb_intel_encoder *psb_intel_encoder; | 328 | struct psb_intel_encoder *psb_intel_encoder; |
329 | struct psb_intel_connector *psb_intel_connector; | 329 | struct gma_connector *gma_connector; |
330 | struct drm_connector *connector; | 330 | struct drm_connector *connector; |
331 | struct drm_encoder *encoder; | 331 | struct drm_encoder *encoder; |
332 | struct drm_psb_private *dev_priv = dev->dev_private; | 332 | struct drm_psb_private *dev_priv = dev->dev_private; |
@@ -338,11 +338,11 @@ void oaktrail_lvds_init(struct drm_device *dev, | |||
338 | if (!psb_intel_encoder) | 338 | if (!psb_intel_encoder) |
339 | return; | 339 | return; |
340 | 340 | ||
341 | psb_intel_connector = kzalloc(sizeof(struct psb_intel_connector), GFP_KERNEL); | 341 | gma_connector = kzalloc(sizeof(struct gma_connector), GFP_KERNEL); |
342 | if (!psb_intel_connector) | 342 | if (!gma_connector) |
343 | goto failed_connector; | 343 | goto failed_connector; |
344 | 344 | ||
345 | connector = &psb_intel_connector->base; | 345 | connector = &gma_connector->base; |
346 | encoder = &psb_intel_encoder->base; | 346 | encoder = &psb_intel_encoder->base; |
347 | dev_priv->is_lvds_on = true; | 347 | dev_priv->is_lvds_on = true; |
348 | drm_connector_init(dev, connector, | 348 | drm_connector_init(dev, connector, |
@@ -352,7 +352,7 @@ void oaktrail_lvds_init(struct drm_device *dev, | |||
352 | drm_encoder_init(dev, encoder, &psb_intel_lvds_enc_funcs, | 352 | drm_encoder_init(dev, encoder, &psb_intel_lvds_enc_funcs, |
353 | DRM_MODE_ENCODER_LVDS); | 353 | DRM_MODE_ENCODER_LVDS); |
354 | 354 | ||
355 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 355 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
356 | psb_intel_encoder->type = INTEL_OUTPUT_LVDS; | 356 | psb_intel_encoder->type = INTEL_OUTPUT_LVDS; |
357 | 357 | ||
358 | drm_encoder_helper_add(encoder, &oaktrail_lvds_helper_funcs); | 358 | drm_encoder_helper_add(encoder, &oaktrail_lvds_helper_funcs); |
@@ -440,7 +440,7 @@ failed_find: | |||
440 | 440 | ||
441 | drm_encoder_cleanup(encoder); | 441 | drm_encoder_cleanup(encoder); |
442 | drm_connector_cleanup(connector); | 442 | drm_connector_cleanup(connector); |
443 | kfree(psb_intel_connector); | 443 | kfree(gma_connector); |
444 | failed_connector: | 444 | failed_connector: |
445 | kfree(psb_intel_encoder); | 445 | kfree(psb_intel_encoder); |
446 | } | 446 | } |
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index c665c91dabde..6cee07013a2d 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c | |||
@@ -594,7 +594,7 @@ struct drm_crtc *psb_intel_get_crtc_from_pipe(struct drm_device *dev, int pipe) | |||
594 | return crtc; | 594 | return crtc; |
595 | } | 595 | } |
596 | 596 | ||
597 | int psb_intel_connector_clones(struct drm_device *dev, int type_mask) | 597 | int gma_connector_clones(struct drm_device *dev, int type_mask) |
598 | { | 598 | { |
599 | int index_mask = 0; | 599 | int index_mask = 0; |
600 | struct drm_connector *connector; | 600 | struct drm_connector *connector; |
diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h index 2a73b915347d..9a34e85c7421 100644 --- a/drivers/gpu/drm/gma500/psb_intel_drv.h +++ b/drivers/gpu/drm/gma500/psb_intel_drv.h | |||
@@ -137,7 +137,7 @@ struct psb_intel_encoder { | |||
137 | struct psb_intel_i2c_chan *ddc_bus; | 137 | struct psb_intel_i2c_chan *ddc_bus; |
138 | }; | 138 | }; |
139 | 139 | ||
140 | struct psb_intel_connector { | 140 | struct gma_connector { |
141 | struct drm_connector base; | 141 | struct drm_connector base; |
142 | struct psb_intel_encoder *encoder; | 142 | struct psb_intel_encoder *encoder; |
143 | }; | 143 | }; |
@@ -195,8 +195,8 @@ struct gma_crtc { | |||
195 | 195 | ||
196 | #define to_gma_crtc(x) \ | 196 | #define to_gma_crtc(x) \ |
197 | container_of(x, struct gma_crtc, base) | 197 | container_of(x, struct gma_crtc, base) |
198 | #define to_psb_intel_connector(x) \ | 198 | #define to_gma_connector(x) \ |
199 | container_of(x, struct psb_intel_connector, base) | 199 | container_of(x, struct gma_connector, base) |
200 | #define to_psb_intel_encoder(x) \ | 200 | #define to_psb_intel_encoder(x) \ |
201 | container_of(x, struct psb_intel_encoder, base) | 201 | container_of(x, struct psb_intel_encoder, base) |
202 | #define to_psb_intel_framebuffer(x) \ | 202 | #define to_psb_intel_framebuffer(x) \ |
@@ -227,13 +227,13 @@ extern void mid_dsi_init(struct drm_device *dev, | |||
227 | struct psb_intel_mode_device *mode_dev, int dsi_num); | 227 | struct psb_intel_mode_device *mode_dev, int dsi_num); |
228 | 228 | ||
229 | extern struct drm_encoder *gma_best_encoder(struct drm_connector *connector); | 229 | extern struct drm_encoder *gma_best_encoder(struct drm_connector *connector); |
230 | extern void gma_connector_attach_encoder(struct psb_intel_connector *connector, | 230 | extern void gma_connector_attach_encoder(struct gma_connector *connector, |
231 | struct psb_intel_encoder *encoder); | 231 | struct psb_intel_encoder *encoder); |
232 | 232 | ||
233 | static inline struct psb_intel_encoder *gma_attached_encoder( | 233 | static inline struct psb_intel_encoder *gma_attached_encoder( |
234 | struct drm_connector *connector) | 234 | struct drm_connector *connector) |
235 | { | 235 | { |
236 | return to_psb_intel_connector(connector)->encoder; | 236 | return to_gma_connector(connector)->encoder; |
237 | } | 237 | } |
238 | 238 | ||
239 | extern struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev, | 239 | extern struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev, |
diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c index 861e2e5900f1..c08627554b50 100644 --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c | |||
@@ -690,7 +690,7 @@ void psb_intel_lvds_init(struct drm_device *dev, | |||
690 | struct psb_intel_mode_device *mode_dev) | 690 | struct psb_intel_mode_device *mode_dev) |
691 | { | 691 | { |
692 | struct psb_intel_encoder *psb_intel_encoder; | 692 | struct psb_intel_encoder *psb_intel_encoder; |
693 | struct psb_intel_connector *psb_intel_connector; | 693 | struct gma_connector *gma_connector; |
694 | struct psb_intel_lvds_priv *lvds_priv; | 694 | struct psb_intel_lvds_priv *lvds_priv; |
695 | struct drm_connector *connector; | 695 | struct drm_connector *connector; |
696 | struct drm_encoder *encoder; | 696 | struct drm_encoder *encoder; |
@@ -707,10 +707,9 @@ void psb_intel_lvds_init(struct drm_device *dev, | |||
707 | return; | 707 | return; |
708 | } | 708 | } |
709 | 709 | ||
710 | psb_intel_connector = | 710 | gma_connector = kzalloc(sizeof(struct gma_connector), GFP_KERNEL); |
711 | kzalloc(sizeof(struct psb_intel_connector), GFP_KERNEL); | 711 | if (!gma_connector) { |
712 | if (!psb_intel_connector) { | 712 | dev_err(dev->dev, "gma_connector allocation error\n"); |
713 | dev_err(dev->dev, "psb_intel_connector allocation error\n"); | ||
714 | goto failed_encoder; | 713 | goto failed_encoder; |
715 | } | 714 | } |
716 | 715 | ||
@@ -722,7 +721,7 @@ void psb_intel_lvds_init(struct drm_device *dev, | |||
722 | 721 | ||
723 | psb_intel_encoder->dev_priv = lvds_priv; | 722 | psb_intel_encoder->dev_priv = lvds_priv; |
724 | 723 | ||
725 | connector = &psb_intel_connector->base; | 724 | connector = &gma_connector->base; |
726 | encoder = &psb_intel_encoder->base; | 725 | encoder = &psb_intel_encoder->base; |
727 | drm_connector_init(dev, connector, | 726 | drm_connector_init(dev, connector, |
728 | &psb_intel_lvds_connector_funcs, | 727 | &psb_intel_lvds_connector_funcs, |
@@ -732,7 +731,7 @@ void psb_intel_lvds_init(struct drm_device *dev, | |||
732 | &psb_intel_lvds_enc_funcs, | 731 | &psb_intel_lvds_enc_funcs, |
733 | DRM_MODE_ENCODER_LVDS); | 732 | DRM_MODE_ENCODER_LVDS); |
734 | 733 | ||
735 | gma_connector_attach_encoder(psb_intel_connector, psb_intel_encoder); | 734 | gma_connector_attach_encoder(gma_connector, psb_intel_encoder); |
736 | psb_intel_encoder->type = INTEL_OUTPUT_LVDS; | 735 | psb_intel_encoder->type = INTEL_OUTPUT_LVDS; |
737 | 736 | ||
738 | drm_encoder_helper_add(encoder, &psb_intel_lvds_helper_funcs); | 737 | drm_encoder_helper_add(encoder, &psb_intel_lvds_helper_funcs); |
@@ -848,7 +847,7 @@ failed_blc_i2c: | |||
848 | drm_encoder_cleanup(encoder); | 847 | drm_encoder_cleanup(encoder); |
849 | drm_connector_cleanup(connector); | 848 | drm_connector_cleanup(connector); |
850 | failed_connector: | 849 | failed_connector: |
851 | kfree(psb_intel_connector); | 850 | kfree(gma_connector); |
852 | failed_encoder: | 851 | failed_encoder: |
853 | kfree(psb_intel_encoder); | 852 | kfree(psb_intel_encoder); |
854 | } | 853 | } |
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c index 730f3071f188..7164c3c8f492 100644 --- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c +++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c | |||
@@ -140,7 +140,7 @@ struct psb_intel_sdvo { | |||
140 | }; | 140 | }; |
141 | 141 | ||
142 | struct psb_intel_sdvo_connector { | 142 | struct psb_intel_sdvo_connector { |
143 | struct psb_intel_connector base; | 143 | struct gma_connector base; |
144 | 144 | ||
145 | /* Mark the type of connector */ | 145 | /* Mark the type of connector */ |
146 | uint16_t output_flag; | 146 | uint16_t output_flag; |
@@ -206,7 +206,7 @@ static struct psb_intel_sdvo *intel_attached_sdvo(struct drm_connector *connecto | |||
206 | 206 | ||
207 | static struct psb_intel_sdvo_connector *to_psb_intel_sdvo_connector(struct drm_connector *connector) | 207 | static struct psb_intel_sdvo_connector *to_psb_intel_sdvo_connector(struct drm_connector *connector) |
208 | { | 208 | { |
209 | return container_of(to_psb_intel_connector(connector), struct psb_intel_sdvo_connector, base); | 209 | return container_of(to_gma_connector(connector), struct psb_intel_sdvo_connector, base); |
210 | } | 210 | } |
211 | 211 | ||
212 | static bool | 212 | static bool |
@@ -2074,7 +2074,7 @@ psb_intel_sdvo_dvi_init(struct psb_intel_sdvo *psb_intel_sdvo, int device) | |||
2074 | { | 2074 | { |
2075 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; | 2075 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; |
2076 | struct drm_connector *connector; | 2076 | struct drm_connector *connector; |
2077 | struct psb_intel_connector *intel_connector; | 2077 | struct gma_connector *intel_connector; |
2078 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; | 2078 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; |
2079 | 2079 | ||
2080 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); | 2080 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); |
@@ -2114,7 +2114,7 @@ psb_intel_sdvo_tv_init(struct psb_intel_sdvo *psb_intel_sdvo, int type) | |||
2114 | { | 2114 | { |
2115 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; | 2115 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; |
2116 | struct drm_connector *connector; | 2116 | struct drm_connector *connector; |
2117 | struct psb_intel_connector *intel_connector; | 2117 | struct gma_connector *intel_connector; |
2118 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; | 2118 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; |
2119 | 2119 | ||
2120 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); | 2120 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); |
@@ -2153,7 +2153,7 @@ psb_intel_sdvo_analog_init(struct psb_intel_sdvo *psb_intel_sdvo, int device) | |||
2153 | { | 2153 | { |
2154 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; | 2154 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; |
2155 | struct drm_connector *connector; | 2155 | struct drm_connector *connector; |
2156 | struct psb_intel_connector *intel_connector; | 2156 | struct gma_connector *intel_connector; |
2157 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; | 2157 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; |
2158 | 2158 | ||
2159 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); | 2159 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); |
@@ -2187,7 +2187,7 @@ psb_intel_sdvo_lvds_init(struct psb_intel_sdvo *psb_intel_sdvo, int device) | |||
2187 | { | 2187 | { |
2188 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; | 2188 | struct drm_encoder *encoder = &psb_intel_sdvo->base.base; |
2189 | struct drm_connector *connector; | 2189 | struct drm_connector *connector; |
2190 | struct psb_intel_connector *intel_connector; | 2190 | struct gma_connector *intel_connector; |
2191 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; | 2191 | struct psb_intel_sdvo_connector *psb_intel_sdvo_connector; |
2192 | 2192 | ||
2193 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); | 2193 | psb_intel_sdvo_connector = kzalloc(sizeof(struct psb_intel_sdvo_connector), GFP_KERNEL); |