aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sdvo.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 16:08:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 16:08:22 -0400
commitbe53bfdb8088e9d1924199cc1a96e113756b1075 (patch)
tree8c65eb9d82ca4c0f11c17cfdc44d5263820b415b /drivers/gpu/drm/i915/intel_sdvo.c
parentb2094ef840697bc8ca5d17a83b7e30fad5f1e9fa (diff)
parent5466c7b1683a23dbbcfb7ee4a71c4f23886001c7 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm main changes from Dave Airlie: "This is the main drm pull request, I'm probably going to send two more smaller ones, will explain below. This contains a patch that is also in the fbdev tree, but it should be the same patch, it added an API for hot unplugging framebuffer devices, and I need that API for a new driver. It also contains some changes to the i2c tree which Jean has acked, and one change to moorestown platform stuff in x86. Highlights: - new drivers: UDL driver for USB displaylink devices, kms only, should support correct hotplug operations. - core: i2c speedups + better hotplug support, EDID overriding via firmware interface - allows user to load a firmware for a broken monitor/kvm from userspace, it even has documentation for it. - exynos: new HDMI audio + hdmi 1.4 + virtual output driver - gma500: code cleanup - radeon: cleanups, CS optimisations, streamout support and pageflip fix - nouveau: NVD9 displayport support + more reclocking work - i915: re-enabling GMBUS, finish gpu patch (might help hibernation who knows), missed irq fixes, stencil tiling fixes, interlaced support, aliasesd PPGTT support for SNB/IVB, swizzling for SNB/IVB, semaphore fixes As well as the usual bunch of cleanups and fixes all over the place. I've got two things I'd like to merge a bit later: a) AMD support for all their new radeonhd 7000 series GPU and APUs. AMD dropped this a bit late due to insane internal review processes, (please AMD just follow Intel and let open source guys ship stuff early) however I don't want to penalise people who own this hardware (since its been on sale for 3-4 months and GPU hw doesn't exactly have a lifetime in years) and consign them to using closed drivers for longer than necessary. The changes are well contained and just plug into the driver new gpu functionality so they should be fairly regression proof. I just want to give them a bit of a run on the hw AMD kindly sent me. b) drm prime/dma-buf interface code. This is just infrastructure code to expose the dma-buf stuff to drm drivers and to userspace. I'm not planning on pushing any driver support in this cycle (except maybe exynos), but I'd like to get the infrastructure code in so for the next cycle I can start getting the driver support into the individual drivers. We have started driver support for i915, nouveau and udl along with I think exynos and omap in staging. However this code relies on the dma-buf tree being pulled into your tree first since it needs the latest interfaces from that tree. I'll push to get that tree sent asap. (oh and any warnings you see in i915 are gcc's fault from what anyone can see)." Fix up trivial conflicts in arch/x86/platform/mrst/mrst.c due to the new msic_thermal_platform_data() thermal function being added next to the tc35876x_platform_data() i2c device function.. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (326 commits) drm/i915: use DDC_ADDR instead of hard-coding it drm/radeon: use DDC_ADDR instead of hard-coding it drm: remove unneeded redefinition of DDC_ADDR drm/exynos: added virtual display driver. drm: allow loading an EDID as firmware to override broken monitor drm/exynos: enable hdmi audio feature drm/exynos: add default pixel format for plane drm/exynos: cleanup exynos_hdmi.h drm/exynos: add is_local member in exynos_drm_subdrv struct drm/exynos: add subdrv open/close functions drm/exynos: remove module of exynos drm subdrv drm/exynos: release pending pageflip events when closed drm/exynos: added new funtion to get/put dma address. drm/exynos: update gem and buffer framework. drm/exynos: added mode_fixup feature and code clean. drm/exynos: add HDMI version 1.4 support drm/exynos: remove exynos_mixer.h gma500: Fix mmap frambuffer drm/radeon: Drop radeon_gem_object_(un)pin. drm/radeon: Restrict offset for legacy display engine. ...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c43
1 files changed, 14 insertions, 29 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index e334ec33a47d..e36b171c1e7d 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -148,7 +148,7 @@ struct intel_sdvo_connector {
148 /* Mark the type of connector */ 148 /* Mark the type of connector */
149 uint16_t output_flag; 149 uint16_t output_flag;
150 150
151 int force_audio; 151 enum hdmi_force_audio force_audio;
152 152
153 /* This contains all current supported TV format */ 153 /* This contains all current supported TV format */
154 u8 tv_format_supported[TV_FORMAT_NUM]; 154 u8 tv_format_supported[TV_FORMAT_NUM];
@@ -944,7 +944,6 @@ intel_sdvo_set_input_timings_for_mode(struct intel_sdvo *intel_sdvo,
944 944
945 intel_sdvo_get_mode_from_dtd(adjusted_mode, &intel_sdvo->input_dtd); 945 intel_sdvo_get_mode_from_dtd(adjusted_mode, &intel_sdvo->input_dtd);
946 946
947 drm_mode_set_crtcinfo(adjusted_mode, 0);
948 return true; 947 return true;
949} 948}
950 949
@@ -1310,8 +1309,8 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
1310 1309
1311 if (status == connector_status_connected) { 1310 if (status == connector_status_connected) {
1312 struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector); 1311 struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
1313 if (intel_sdvo_connector->force_audio) 1312 if (intel_sdvo_connector->force_audio != HDMI_AUDIO_AUTO)
1314 intel_sdvo->has_hdmi_audio = intel_sdvo_connector->force_audio > 0; 1313 intel_sdvo->has_hdmi_audio = (intel_sdvo_connector->force_audio == HDMI_AUDIO_ON);
1315 } 1314 }
1316 1315
1317 return status; 1316 return status;
@@ -1684,10 +1683,10 @@ intel_sdvo_set_property(struct drm_connector *connector,
1684 1683
1685 intel_sdvo_connector->force_audio = i; 1684 intel_sdvo_connector->force_audio = i;
1686 1685
1687 if (i == 0) 1686 if (i == HDMI_AUDIO_AUTO)
1688 has_audio = intel_sdvo_detect_hdmi_audio(connector); 1687 has_audio = intel_sdvo_detect_hdmi_audio(connector);
1689 else 1688 else
1690 has_audio = i > 0; 1689 has_audio = (i == HDMI_AUDIO_ON);
1691 1690
1692 if (has_audio == intel_sdvo->has_hdmi_audio) 1691 if (has_audio == intel_sdvo->has_hdmi_audio)
1693 return 0; 1692 return 0;
@@ -1985,7 +1984,7 @@ intel_sdvo_connector_init(struct intel_sdvo_connector *connector,
1985 drm_connector_helper_add(&connector->base.base, 1984 drm_connector_helper_add(&connector->base.base,
1986 &intel_sdvo_connector_helper_funcs); 1985 &intel_sdvo_connector_helper_funcs);
1987 1986
1988 connector->base.base.interlace_allowed = 0; 1987 connector->base.base.interlace_allowed = 1;
1989 connector->base.base.doublescan_allowed = 0; 1988 connector->base.base.doublescan_allowed = 0;
1990 connector->base.base.display_info.subpixel_order = SubPixelHorizontalRGB; 1989 connector->base.base.display_info.subpixel_order = SubPixelHorizontalRGB;
1991 1990
@@ -2277,10 +2276,8 @@ static bool intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo,
2277 intel_sdvo_connector->max_##name = data_value[0]; \ 2276 intel_sdvo_connector->max_##name = data_value[0]; \
2278 intel_sdvo_connector->cur_##name = response; \ 2277 intel_sdvo_connector->cur_##name = response; \
2279 intel_sdvo_connector->name = \ 2278 intel_sdvo_connector->name = \
2280 drm_property_create(dev, DRM_MODE_PROP_RANGE, #name, 2); \ 2279 drm_property_create_range(dev, 0, #name, 0, data_value[0]); \
2281 if (!intel_sdvo_connector->name) return false; \ 2280 if (!intel_sdvo_connector->name) return false; \
2282 intel_sdvo_connector->name->values[0] = 0; \
2283 intel_sdvo_connector->name->values[1] = data_value[0]; \
2284 drm_connector_attach_property(connector, \ 2281 drm_connector_attach_property(connector, \
2285 intel_sdvo_connector->name, \ 2282 intel_sdvo_connector->name, \
2286 intel_sdvo_connector->cur_##name); \ 2283 intel_sdvo_connector->cur_##name); \
@@ -2314,25 +2311,19 @@ intel_sdvo_create_enhance_property_tv(struct intel_sdvo *intel_sdvo,
2314 intel_sdvo_connector->left_margin = data_value[0] - response; 2311 intel_sdvo_connector->left_margin = data_value[0] - response;
2315 intel_sdvo_connector->right_margin = intel_sdvo_connector->left_margin; 2312 intel_sdvo_connector->right_margin = intel_sdvo_connector->left_margin;
2316 intel_sdvo_connector->left = 2313 intel_sdvo_connector->left =
2317 drm_property_create(dev, DRM_MODE_PROP_RANGE, 2314 drm_property_create_range(dev, 0, "left_margin", 0, data_value[0]);
2318 "left_margin", 2);
2319 if (!intel_sdvo_connector->left) 2315 if (!intel_sdvo_connector->left)
2320 return false; 2316 return false;
2321 2317
2322 intel_sdvo_connector->left->values[0] = 0;
2323 intel_sdvo_connector->left->values[1] = data_value[0];
2324 drm_connector_attach_property(connector, 2318 drm_connector_attach_property(connector,
2325 intel_sdvo_connector->left, 2319 intel_sdvo_connector->left,
2326 intel_sdvo_connector->left_margin); 2320 intel_sdvo_connector->left_margin);
2327 2321
2328 intel_sdvo_connector->right = 2322 intel_sdvo_connector->right =
2329 drm_property_create(dev, DRM_MODE_PROP_RANGE, 2323 drm_property_create_range(dev, 0, "right_margin", 0, data_value[0]);
2330 "right_margin", 2);
2331 if (!intel_sdvo_connector->right) 2324 if (!intel_sdvo_connector->right)
2332 return false; 2325 return false;
2333 2326
2334 intel_sdvo_connector->right->values[0] = 0;
2335 intel_sdvo_connector->right->values[1] = data_value[0];
2336 drm_connector_attach_property(connector, 2327 drm_connector_attach_property(connector,
2337 intel_sdvo_connector->right, 2328 intel_sdvo_connector->right,
2338 intel_sdvo_connector->right_margin); 2329 intel_sdvo_connector->right_margin);
@@ -2356,25 +2347,21 @@ intel_sdvo_create_enhance_property_tv(struct intel_sdvo *intel_sdvo,
2356 intel_sdvo_connector->top_margin = data_value[0] - response; 2347 intel_sdvo_connector->top_margin = data_value[0] - response;
2357 intel_sdvo_connector->bottom_margin = intel_sdvo_connector->top_margin; 2348 intel_sdvo_connector->bottom_margin = intel_sdvo_connector->top_margin;
2358 intel_sdvo_connector->top = 2349 intel_sdvo_connector->top =
2359 drm_property_create(dev, DRM_MODE_PROP_RANGE, 2350 drm_property_create_range(dev, 0,
2360 "top_margin", 2); 2351 "top_margin", 0, data_value[0]);
2361 if (!intel_sdvo_connector->top) 2352 if (!intel_sdvo_connector->top)
2362 return false; 2353 return false;
2363 2354
2364 intel_sdvo_connector->top->values[0] = 0;
2365 intel_sdvo_connector->top->values[1] = data_value[0];
2366 drm_connector_attach_property(connector, 2355 drm_connector_attach_property(connector,
2367 intel_sdvo_connector->top, 2356 intel_sdvo_connector->top,
2368 intel_sdvo_connector->top_margin); 2357 intel_sdvo_connector->top_margin);
2369 2358
2370 intel_sdvo_connector->bottom = 2359 intel_sdvo_connector->bottom =
2371 drm_property_create(dev, DRM_MODE_PROP_RANGE, 2360 drm_property_create_range(dev, 0,
2372 "bottom_margin", 2); 2361 "bottom_margin", 0, data_value[0]);
2373 if (!intel_sdvo_connector->bottom) 2362 if (!intel_sdvo_connector->bottom)
2374 return false; 2363 return false;
2375 2364
2376 intel_sdvo_connector->bottom->values[0] = 0;
2377 intel_sdvo_connector->bottom->values[1] = data_value[0];
2378 drm_connector_attach_property(connector, 2365 drm_connector_attach_property(connector,
2379 intel_sdvo_connector->bottom, 2366 intel_sdvo_connector->bottom,
2380 intel_sdvo_connector->bottom_margin); 2367 intel_sdvo_connector->bottom_margin);
@@ -2403,12 +2390,10 @@ intel_sdvo_create_enhance_property_tv(struct intel_sdvo *intel_sdvo,
2403 intel_sdvo_connector->max_dot_crawl = 1; 2390 intel_sdvo_connector->max_dot_crawl = 1;
2404 intel_sdvo_connector->cur_dot_crawl = response & 0x1; 2391 intel_sdvo_connector->cur_dot_crawl = response & 0x1;
2405 intel_sdvo_connector->dot_crawl = 2392 intel_sdvo_connector->dot_crawl =
2406 drm_property_create(dev, DRM_MODE_PROP_RANGE, "dot_crawl", 2); 2393 drm_property_create_range(dev, 0, "dot_crawl", 0, 1);
2407 if (!intel_sdvo_connector->dot_crawl) 2394 if (!intel_sdvo_connector->dot_crawl)
2408 return false; 2395 return false;
2409 2396
2410 intel_sdvo_connector->dot_crawl->values[0] = 0;
2411 intel_sdvo_connector->dot_crawl->values[1] = 1;
2412 drm_connector_attach_property(connector, 2397 drm_connector_attach_property(connector,
2413 intel_sdvo_connector->dot_crawl, 2398 intel_sdvo_connector->dot_crawl,
2414 intel_sdvo_connector->cur_dot_crawl); 2399 intel_sdvo_connector->cur_dot_crawl);