diff options
-rw-r--r-- | src/intel_display.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/intel_display.c b/src/intel_display.c index ffcdb739..74ce7362 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -658,6 +658,13 @@ intel_crtc_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num) list_add(&intel_crtc->link, &mode->crtcs); } +static Bool +is_panel(int type) +{ + return (type == DRM_MODE_CONNECTOR_LVDS || + type == DRM_MODE_CONNECTOR_eDP); +} + static xf86OutputStatus intel_output_detect(xf86OutputPtr output) { @@ -823,8 +830,7 @@ intel_output_get_modes(xf86OutputPtr output) * If it is incorrect, please fix me. */ intel_output->has_panel_limits = FALSE; - if (koutput->connector_type == DRM_MODE_CONNECTOR_LVDS || - koutput->connector_type == DRM_MODE_CONNECTOR_eDP) { + if (is_panel(koutput->connector_type)) { for (i = 0; i < koutput->count_modes; i++) { drmModeModeInfo *mode_ptr; @@ -1293,8 +1299,7 @@ intel_output_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num) output->subpixel_order = subpixel_conv_table[koutput->subpixel]; output->driver_private = intel_output; - if (koutput->connector_type == DRM_MODE_CONNECTOR_LVDS || - koutput->connector_type == DRM_MODE_CONNECTOR_eDP) + if (is_panel(koutput->connector_type)) intel_output_backlight_init(output); output->possible_crtcs = kencoder->possible_crtcs; |