mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
drm/i915/icl: introduce tc_port
Add and enum for TC ports and auxiliary functions to handle them. Icelake brings a lot of registers and other things that only apply to the TC ports and are indexed starting from 0, so having an enum for tc_ports that starts at 0 really helps the indexing. This patch is based on previous patches written by Dhinakaran Pandiyan and Mahesh Kumar. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Mahesh Kumar <mahesh1.kumar@intel.com> Reviewed-by: Mahesh Kumar <mahesh1.kumar@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180522002558.29262-4-paulo.r.zanoni@intel.com
This commit is contained in:
parent
9bb635d9e7
commit
ac213c1b45
3 changed files with 30 additions and 0 deletions
|
@ -5869,6 +5869,22 @@ static void i9xx_pfit_enable(struct intel_crtc *crtc)
|
|||
I915_WRITE(BCLRPAT(crtc->pipe), 0);
|
||||
}
|
||||
|
||||
bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port port)
|
||||
{
|
||||
if (IS_ICELAKE(dev_priv))
|
||||
return port >= PORT_C && port <= PORT_F;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
enum tc_port intel_port_to_tc(struct drm_i915_private *dev_priv, enum port port)
|
||||
{
|
||||
if (!intel_port_is_tc(dev_priv, port))
|
||||
return PORT_TC_NONE;
|
||||
|
||||
return port - PORT_C;
|
||||
}
|
||||
|
||||
enum intel_display_power_domain intel_port_to_power_domain(enum port port)
|
||||
{
|
||||
switch (port) {
|
||||
|
|
|
@ -126,6 +126,17 @@ enum port {
|
|||
|
||||
#define port_name(p) ((p) + 'A')
|
||||
|
||||
enum tc_port {
|
||||
PORT_TC_NONE = -1,
|
||||
|
||||
PORT_TC1 = 0,
|
||||
PORT_TC2,
|
||||
PORT_TC3,
|
||||
PORT_TC4,
|
||||
|
||||
I915_MAX_TC_PORTS
|
||||
};
|
||||
|
||||
enum dpio_channel {
|
||||
DPIO_CH0,
|
||||
DPIO_CH1
|
||||
|
|
|
@ -1489,6 +1489,9 @@ void intel_connector_attach_encoder(struct intel_connector *connector,
|
|||
struct intel_encoder *encoder);
|
||||
struct drm_display_mode *
|
||||
intel_encoder_current_mode(struct intel_encoder *encoder);
|
||||
bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port port);
|
||||
enum tc_port intel_port_to_tc(struct drm_i915_private *dev_priv,
|
||||
enum port port);
|
||||
|
||||
enum pipe intel_get_pipe_from_connector(struct intel_connector *connector);
|
||||
int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
|
||||
|
|
Loading…
Add table
Reference in a new issue