From: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH v2 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp
Date: Thu, 26 Oct 2017 17:20:29 -0700 [thread overview]
Message-ID: <20171027002029.17213-2-radhakrishna.sripada@intel.com> (raw)
In-Reply-To: <20171027002029.17213-1-radhakrishna.sripada@intel.com>
From: "Sripada, Radhakrishna" <radhakrishna.sripada@intel.com>
Use the newly added "max bpc" connector property to limit pipe bpp.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e2ac976844d8..d3cf68bd4fdc 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10507,6 +10507,28 @@ connected_sink_compute_bpp(struct intel_connector *connector,
}
}
+static void
+connected_sink_max_bpp(struct intel_digital_connector_state *intel_conn_state,
+ struct intel_crtc_state *pipe_config)
+{
+ switch (intel_conn_state->max_bpc) {
+ case 8:
+ case 9:
+ pipe_config->pipe_bpp = 8*3;
+ break;
+ case 10:
+ case 11:
+ pipe_config->pipe_bpp = 10*3;
+ break;
+ case 12:
+ pipe_config->pipe_bpp = 12*3;
+ break;
+ default:
+ break;
+ }
+ DRM_DEBUG_KMS("Limiting display bpp to %d\n", pipe_config->pipe_bpp);
+}
+
static int
compute_baseline_pipe_bpp(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config)
@@ -10515,6 +10537,7 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc,
struct drm_atomic_state *state;
struct drm_connector *connector;
struct drm_connector_state *connector_state;
+ struct intel_digital_connector_state *intel_conn_state;
int bpp, i;
if ((IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
@@ -10535,6 +10558,10 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc,
if (connector_state->crtc != &crtc->base)
continue;
+ intel_conn_state = to_intel_digital_connector_state(connector_state);
+ if (intel_conn_state->max_bpc)
+ connected_sink_max_bpp(intel_conn_state, pipe_config);
+
connected_sink_compute_bpp(to_intel_connector(connector),
pipe_config);
}
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-27 0:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 0:20 [PATCH v2 1/2] drm/i915: Add connector property to limit max bpc Radhakrishna Sripada
2017-10-27 0:20 ` Radhakrishna Sripada [this message]
2017-10-27 0:53 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/2] " Patchwork
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=20171027002029.17213-2-radhakrishna.sripada@intel.com \
--to=radhakrishna.sripada@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
/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