drm/i915: Replace a bunch of connector->base.display_info with a local variable

Reduce the eyesore with a local variable.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-10-git-send-email-ville.syrjala@linux.intel.com
This commit is contained in:
Ville Syrjälä 2016-09-28 16:51:42 +03:00 committed by Daniel Vetter
parent 23ebf8b9ea
commit 6a2a5c5dea
1 changed files with 7 additions and 7 deletions

View File

@ -12654,6 +12654,7 @@ static void
connected_sink_compute_bpp(struct intel_connector *connector, connected_sink_compute_bpp(struct intel_connector *connector,
struct intel_crtc_state *pipe_config) struct intel_crtc_state *pipe_config)
{ {
const struct drm_display_info *info = &connector->base.display_info;
int bpp = pipe_config->pipe_bpp; int bpp = pipe_config->pipe_bpp;
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] checking for sink bpp constrains\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s] checking for sink bpp constrains\n",
@ -12661,15 +12662,14 @@ connected_sink_compute_bpp(struct intel_connector *connector,
connector->base.name); connector->base.name);
/* Don't use an invalid EDID bpc value */ /* Don't use an invalid EDID bpc value */
if (connector->base.display_info.bpc && if (info->bpc != 0 && info->bpc * 3 < bpp) {
connector->base.display_info.bpc * 3 < bpp) {
DRM_DEBUG_KMS("clamping display bpp (was %d) to EDID reported max of %d\n", DRM_DEBUG_KMS("clamping display bpp (was %d) to EDID reported max of %d\n",
bpp, connector->base.display_info.bpc*3); bpp, info->bpc * 3);
pipe_config->pipe_bpp = connector->base.display_info.bpc*3; pipe_config->pipe_bpp = info->bpc * 3;
} }
/* Clamp bpp to 8 on screens without EDID 1.4 */ /* Clamp bpp to 8 on screens without EDID 1.4 */
if (connector->base.display_info.bpc == 0 && bpp > 24) { if (info->bpc == 0 && bpp > 24) {
DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of 24\n", DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of 24\n",
bpp); bpp);
pipe_config->pipe_bpp = 24; pipe_config->pipe_bpp = 24;