From: "Mohan Marimuthu, Yogesh" <yogesh.mohan.marimuthu@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>,
Gaurav K Singh <gaurav.k.singh@intel.com>
Cc: Shobhit Kumar <shobhit.kumar@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [RFC 11/14] drm/i915: Enable MIPI display self refresh mode
Date: Sat, 13 Jun 2015 12:24:57 +0530 [thread overview]
Message-ID: <557BD3C1.3030308@intel.com> (raw)
In-Reply-To: <20150529172156.GV8341@phenom.ffwll.local>
On 5/29/2015 10:51 PM, Daniel Vetter wrote:
> On Fri, May 29, 2015 at 04:07:03PM +0530, Gaurav K Singh wrote:
>> During enable sequence for MIPI encoder in command mode, enable
>> MIPI display self-refresh mode bit in Pipe Ctrl reg.
>>
>> Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
>> Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com>
>> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index cab2ac8..fc84313 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -44,6 +44,7 @@
>> #include <drm/drm_plane_helper.h>
>> #include <drm/drm_rect.h>
>> #include <linux/dma_remapping.h>
>> +#include "intel_dsi.h"
>>
>> /* Primary plane formats supported by all gen */
>> #define COMMON_PRIMARY_FORMATS \
>> @@ -2110,6 +2111,8 @@ static void intel_enable_pipe(struct intel_crtc *crtc)
>> {
>> struct drm_device *dev = crtc->base.dev;
>> struct drm_i915_private *dev_priv = dev->dev_private;
>> + struct intel_encoder *encoder;
>> + struct intel_dsi *intel_dsi;
>> enum pipe pipe = crtc->pipe;
>> enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv,
>> pipe);
>> @@ -2154,6 +2157,18 @@ static void intel_enable_pipe(struct intel_crtc *crtc)
>> return;
>> }
>>
>> + for_each_encoder_on_crtc(dev, &crtc->base, encoder) {
>> + if (encoder->type == INTEL_OUTPUT_DSI) {
>> + intel_dsi = enc_to_intel_dsi(&encoder->base);
>> + if (intel_dsi && (intel_dsi->operation_mode ==
>> + INTEL_DSI_COMMAND_MODE)) {
>> + val = val | PIPECONF_MIPI_DSR_ENABLE;
>> + I915_WRITE(reg, val);
>> + }
>> + break;
>> + }
>> + }
> When we have these kind of encoder/crtc state depencies we resolve them by
> adding a bit of state to intel_crtc_state which is set as needed in the
> encoder's compute_config callback. Then all you need here is
>
> if (intel_state->dsi_self_refresh)
> val |= PIPECONF_MIPI_DSR_ENABLE;
>
> Also is that additional write really required?
> -Daniel
Yes additional write is required. MIPI_DSR_ENABLE has to be written
first then followed
by pipe enable. if MIPI_DSR_ENABLE and pipe enable is done in same
write, observed
that the image from pipe is not sent to panel when issued mem write command.
Having a state variable instead of looping through the encoders
definitely looks good.
Need to find a place to update the state variable. I will get back on this.
>> +
>> I915_WRITE(reg, val | PIPECONF_ENABLE);
>> POSTING_READ(reg);
>> }
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-13 6:55 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 10:36 [RFC 00/14] DSI Command mode(DBI mode) enabling on CHT Gaurav K Singh
2015-05-29 10:36 ` [RFC 01/14] drm/i915: allocate gem memory for mipi dbi cmd buffer Gaurav K Singh
2015-05-29 10:59 ` Ville Syrjälä
2015-05-29 17:10 ` Daniel Vetter
2015-06-01 11:03 ` Ville Syrjälä
2015-06-15 10:30 ` Daniel Vetter
2015-06-16 17:08 ` Singh, Gaurav K
2015-06-18 22:02 ` {Intel-gfx] " Gaurav K Singh
2015-06-18 22:06 ` Singh, Gaurav K
2015-05-29 10:36 ` [RFC 02/14] drm/i915: Add support for TEAR ON Sequence Gaurav K Singh
2015-05-29 10:36 ` [RFC 03/14] drm/i915: Add functions for dcs memory write cmd Gaurav K Singh
2015-05-29 10:36 ` [RFC 04/14] drm/i915: Calculate bw timer for mipi DBI interface Gaurav K Singh
2015-05-29 10:36 ` [RFC 05/14] drm/i915: Use the bpp value wrt the pixel format Gaurav K Singh
2015-05-29 10:36 ` [RFC 06/14] drm/i915: Disable vlank interrupt for disabling MIPI cmd mode Gaurav K Singh
2015-05-29 17:14 ` Daniel Vetter
2015-05-29 17:23 ` Daniel Vetter
2015-06-16 16:54 ` Singh, Gaurav K
2015-06-17 11:36 ` Daniel Vetter
2015-06-18 21:49 ` Gaurav K Singh
2015-06-22 11:58 ` Daniel Vetter
2015-05-29 10:36 ` [RFC 07/14] drm/i915: Disable MIPI display self refresh mode Gaurav K Singh
2015-05-29 17:16 ` Daniel Vetter
2015-05-29 17:20 ` Daniel Vetter
2015-06-16 16:59 ` Singh, Gaurav K
2015-06-18 21:53 ` Gaurav K Singh
2015-06-22 12:04 ` Daniel Vetter
2015-05-29 10:37 ` [RFC 08/14] drm/i915: Disable Tearing effect trigger by GPIO pin Gaurav K Singh
2015-05-29 10:37 ` [RFC 09/14] drm/i915: Changes for command mode preparation Gaurav K Singh
2015-05-29 10:37 ` [RFC 10/14] drm/i915: Enable Tearing effect trigger by GPIO pin Gaurav K Singh
2015-05-29 10:37 ` [RFC 11/14] drm/i915: Enable MIPI display self refresh mode Gaurav K Singh
2015-05-29 17:21 ` Daniel Vetter
2015-06-13 6:54 ` Mohan Marimuthu, Yogesh [this message]
2015-06-15 10:33 ` Daniel Vetter
2015-06-16 17:03 ` Singh, Gaurav K
2015-06-17 11:39 ` Daniel Vetter
2015-06-18 21:56 ` Gaurav K Singh
2015-06-22 12:05 ` Daniel Vetter
2015-06-22 12:08 ` Daniel Vetter
2015-05-29 10:37 ` [RFC 12/14] drm/i915: Generalize DSI enable function Gaurav K Singh
2015-05-29 10:37 ` [RFC 13/14] drm/i915: Reset the display hw if vid mode to cmd mode Gaurav K Singh
2015-05-29 10:37 ` [RFC 14/14] drm/i915: send one frame after enabling mipi " Gaurav K Singh
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=557BD3C1.3030308@intel.com \
--to=yogesh.mohan.marimuthu@intel.com \
--cc=daniel@ffwll.ch \
--cc=gaurav.k.singh@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=shobhit.kumar@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 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.