From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/3] drm/i915: warn about invalid pfit modes
Date: Thu, 25 Apr 2013 12:55:03 -0700 [thread overview]
Message-ID: <1366919703-20309-3-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1366919703-20309-1-git-send-email-jbarnes@virtuousgeek.org>
We prevent invalid ones from getting here in the first place, but it
doesn't hurt to have an extra sanity check.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
drivers/gpu/drm/i915/intel_panel.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 016e676..48e7207 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -58,7 +58,6 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc,
struct intel_crtc_config *pipe_config,
int fitting_mode)
{
- struct drm_i915_private *dev_priv = intel_crtc->base.dev->dev_private;
struct drm_display_mode *mode, *adjusted_mode;
int x, y, width, height;
@@ -107,12 +106,15 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc,
}
break;
- default:
case DRM_MODE_SCALE_FULLSCREEN:
x = y = 0;
width = adjusted_mode->hdisplay;
height = adjusted_mode->vdisplay;
break;
+
+ default:
+ WARN(1, "bad panel fit mode: %d\n", fitting_mode);
+ return;
}
done:
@@ -266,7 +268,6 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
}
}
break;
- default:
case DRM_MODE_SCALE_FULLSCREEN:
/*
* Full scaling, even if it changes the aspect ratio.
@@ -284,6 +285,9 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
HORIZ_INTERP_BILINEAR);
}
break;
+ default:
+ WARN(1, "bad panel fit mode: %d\n", fitting_mode);
+ return;
}
/* 965+ wants fuzzy fitting */
--
1.7.10.4
next prev parent reply other threads:[~2013-04-25 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 19:55 [PATCH 1/3] drm/i915: factor out GMCH panel fitting code and use for eDP v3 Jesse Barnes
2013-04-25 19:55 ` [PATCH 2/3] drm/i915: move PCH pfit controls into pipe_config Jesse Barnes
2013-05-02 22:02 ` Paulo Zanoni
2013-05-03 8:10 ` Daniel Vetter
2013-04-25 19:55 ` Jesse Barnes [this message]
2013-04-25 20:20 ` [PATCH 3/3] drm/i915: warn about invalid pfit modes Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366919703-20309-3-git-send-email-jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox