From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/dsi: fix CHV dsi encoder hardware state readout on port C
Date: Fri, 15 Apr 2016 15:54:22 +0300 [thread overview]
Message-ID: <20160415125422.GU4329@intel.com> (raw)
In-Reply-To: <1460724451-13810-1-git-send-email-jani.nikula@intel.com>
On Fri, Apr 15, 2016 at 03:47:31PM +0300, Jani Nikula wrote:
> Due to "some hardware limitation" the DPI enable bit in port C control
> register does not get set on VLV. As a workaround we check the status in
> pipe B conf register instead. The workaround was added in
>
> commit c0beefd29fcb1ca998f0f9ba41be8539f8eeba9b
> Author: Gaurav K Singh <gaurav.k.singh@intel.com>
> Date: Tue Dec 9 10:59:20 2014 +0530
>
> drm/i915: Software workaround for getting the HW status of DSI Port C on BYT
>
> Empirical evidence (on Surface 3 with DSI on port C per VBT) shows that
> this is the case also on CHV, so extend the workaround to CHV. We still
> have the device ready register check in place, so this should not get
> confused with e.g. HDMI on pipe B.
>
> This fixes a number of state checker warnings on CHV DSI port C.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dsi.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index 9ff6435e7d38..f57adb0f0ee4 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -722,11 +722,12 @@ static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
> BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port);
> bool enabled = I915_READ(ctrl_reg) & DPI_ENABLE;
>
> - /* Due to some hardware limitations on BYT, MIPI Port C DPI
> - * Enable bit does not get set. To check whether DSI Port C
> - * was enabled in BIOS, check the Pipe B enable bit
> + /*
> + * Due to some hardware limitations on VLV/CHV, the DPI enable
> + * bit in port C control register does not get set. As a
> + * workaround, check pipe B conf instead.
> */
> - if (IS_VALLEYVIEW(dev) && port == PORT_C)
> + if ((IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev)) && port == PORT_C)
> enabled = I915_READ(PIPECONF(PIPE_B)) & PIPECONF_ENABLE;
I saw your register dumps, so I believe it.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> /* Try command mode if video mode not enabled */
> --
> 2.1.4
--
Ville Syrjälä
Intel OTC
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/dsi: fix CHV dsi encoder hardware state readout on port C
Date: Fri, 15 Apr 2016 15:54:22 +0300 [thread overview]
Message-ID: <20160415125422.GU4329@intel.com> (raw)
In-Reply-To: <1460724451-13810-1-git-send-email-jani.nikula@intel.com>
On Fri, Apr 15, 2016 at 03:47:31PM +0300, Jani Nikula wrote:
> Due to "some hardware limitation" the DPI enable bit in port C control
> register does not get set on VLV. As a workaround we check the status in
> pipe B conf register instead. The workaround was added in
>
> commit c0beefd29fcb1ca998f0f9ba41be8539f8eeba9b
> Author: Gaurav K Singh <gaurav.k.singh@intel.com>
> Date: Tue Dec 9 10:59:20 2014 +0530
>
> drm/i915: Software workaround for getting the HW status of DSI Port C on BYT
>
> Empirical evidence (on Surface 3 with DSI on port C per VBT) shows that
> this is the case also on CHV, so extend the workaround to CHV. We still
> have the device ready register check in place, so this should not get
> confused with e.g. HDMI on pipe B.
>
> This fixes a number of state checker warnings on CHV DSI port C.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dsi.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index 9ff6435e7d38..f57adb0f0ee4 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -722,11 +722,12 @@ static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
> BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port);
> bool enabled = I915_READ(ctrl_reg) & DPI_ENABLE;
>
> - /* Due to some hardware limitations on BYT, MIPI Port C DPI
> - * Enable bit does not get set. To check whether DSI Port C
> - * was enabled in BIOS, check the Pipe B enable bit
> + /*
> + * Due to some hardware limitations on VLV/CHV, the DPI enable
> + * bit in port C control register does not get set. As a
> + * workaround, check pipe B conf instead.
> */
> - if (IS_VALLEYVIEW(dev) && port == PORT_C)
> + if ((IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev)) && port == PORT_C)
> enabled = I915_READ(PIPECONF(PIPE_B)) & PIPECONF_ENABLE;
I saw your register dumps, so I believe it.
Reviewed-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
>
> /* Try command mode if video mode not enabled */
> --
> 2.1.4
--
Ville Syrj�l�
Intel OTC
next prev parent reply other threads:[~2016-04-15 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 12:47 [PATCH] drm/i915/dsi: fix CHV dsi encoder hardware state readout on port C Jani Nikula
2016-04-15 12:47 ` Jani Nikula
2016-04-15 12:54 ` Ville Syrjälä [this message]
2016-04-15 12:54 ` Ville Syrjälä
2016-04-15 16:25 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-04-18 9:30 ` Jani Nikula
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=20160415125422.GU4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.