@@ -199,7 +199,7 @@ to_intel_sdvo_connector(struct drm_connector *connector)
199
199
container_of((conn_state), struct intel_sdvo_connector_state, base.base)
200
200
201
201
static bool
202
- intel_sdvo_output_setup (struct intel_sdvo * intel_sdvo , u16 flags );
202
+ intel_sdvo_output_setup (struct intel_sdvo * intel_sdvo );
203
203
static bool
204
204
intel_sdvo_tv_create_property (struct intel_sdvo * intel_sdvo ,
205
205
struct intel_sdvo_connector * intel_sdvo_connector ,
@@ -2946,11 +2946,18 @@ static u16 intel_sdvo_filter_output_flags(u16 flags)
2946
2946
}
2947
2947
2948
2948
static bool
2949
- intel_sdvo_output_setup (struct intel_sdvo * intel_sdvo , u16 flags )
2949
+ intel_sdvo_output_setup (struct intel_sdvo * intel_sdvo )
2950
2950
{
2951
2951
struct drm_i915_private * i915 = to_i915 (intel_sdvo -> base .base .dev );
2952
+ u16 flags ;
2952
2953
2953
- flags = intel_sdvo_filter_output_flags (flags );
2954
+ flags = intel_sdvo_filter_output_flags (intel_sdvo -> caps .output_flags );
2955
+
2956
+ if (flags == 0 ) {
2957
+ DRM_DEBUG_KMS ("%s: Unknown SDVO output type (0x%04x)\n" ,
2958
+ SDVO_NAME (intel_sdvo ), intel_sdvo -> caps .output_flags );
2959
+ return false;
2960
+ }
2954
2961
2955
2962
intel_sdvo -> controlled_output = flags ;
2956
2963
@@ -2993,15 +3000,6 @@ intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, u16 flags)
2993
3000
if (!intel_sdvo_lvds_init (intel_sdvo , 1 ))
2994
3001
return false;
2995
3002
2996
- if (flags == 0 ) {
2997
- unsigned char bytes [2 ];
2998
-
2999
- memcpy (bytes , & intel_sdvo -> caps .output_flags , 2 );
3000
- DRM_DEBUG_KMS ("%s: Unknown SDVO output type (0x%02x%02x)\n" ,
3001
- SDVO_NAME (intel_sdvo ),
3002
- bytes [0 ], bytes [1 ]);
3003
- return false;
3004
- }
3005
3003
intel_sdvo -> base .pipe_mask = ~0 ;
3006
3004
3007
3005
return true;
@@ -3377,8 +3375,7 @@ bool intel_sdvo_init(struct drm_i915_private *dev_priv,
3377
3375
intel_sdvo -> colorimetry_cap =
3378
3376
intel_sdvo_get_colorimetry_cap (intel_sdvo );
3379
3377
3380
- if (intel_sdvo_output_setup (intel_sdvo ,
3381
- intel_sdvo -> caps .output_flags ) != true) {
3378
+ if (!intel_sdvo_output_setup (intel_sdvo )) {
3382
3379
drm_dbg_kms (& dev_priv -> drm ,
3383
3380
"SDVO output failed to setup on %s\n" ,
3384
3381
SDVO_NAME (intel_sdvo ));
0 commit comments