diff mbox

[1/2] drm/dp: Add defines for latency in sink

Message ID 1506126883-22800-1-git-send-email-vathsala.nagaraju@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

vathsala nagaraju Sept. 23, 2017, 12:34 a.m. UTC
Add defines for dpcd register 2009 (synchronization latency
in sink).

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
CC: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
---
 include/drm/drm_dp_helper.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jani Nikula Sept. 25, 2017, 8:23 a.m. UTC | #1
On Sat, 23 Sep 2017, vathsala nagaraju <vathsala.nagaraju@intel.com> wrote:
> Add defines for dpcd register 2009 (synchronization latency
> in sink).
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> CC: Puthikorn Voravootivat <puthik@chromium.org>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
> ---
>  include/drm/drm_dp_helper.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 11c39f1..846004e6 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -735,6 +735,9 @@
>  # define DP_PSR_SINK_INTERNAL_ERROR         7
>  # define DP_PSR_SINK_STATE_MASK             0x07
>  
> +#define DP_SINK_SYNCHRONIZATION_LATENCY	    0x2009
> +# define DP_MAX_RESYNC_FRAME_CNT_MASK	    0xf

For the DP spec, please don't invent the names, use the ones from the
spec. At most drop excess stuff from the end.

#define DP_SYNCHRONIZATION_LATENCY_IN_SINK
# define DP_MAX_RESYNC_FRAME_COUNT_SHIFT
# define DP_MAX_RESYNC_FRAME_COUNT_MASK

And while at it, please add the full register contents.

BR,
Jani.

> +
>  #define DP_RECEIVER_ALPM_STATUS		    0x200b  /* eDP 1.4 */
>  # define DP_ALPM_LOCK_TIMEOUT_ERROR	    (1 << 0)
vathsala nagaraju Sept. 25, 2017, 9:01 a.m. UTC | #2
On Monday 25 September 2017 01:53 PM, Jani Nikula wrote:
> On Sat, 23 Sep 2017, vathsala nagaraju <vathsala.nagaraju@intel.com> wrote:
>> Add defines for dpcd register 2009 (synchronization latency
>> in sink).
>>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> CC: Puthikorn Voravootivat <puthik@chromium.org>
>> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
>> ---
>>   include/drm/drm_dp_helper.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
>> index 11c39f1..846004e6 100644
>> --- a/include/drm/drm_dp_helper.h
>> +++ b/include/drm/drm_dp_helper.h
>> @@ -735,6 +735,9 @@
>>   # define DP_PSR_SINK_INTERNAL_ERROR         7
>>   # define DP_PSR_SINK_STATE_MASK             0x07
>>   
>> +#define DP_SINK_SYNCHRONIZATION_LATENCY	    0x2009
>> +# define DP_MAX_RESYNC_FRAME_CNT_MASK	    0xf
> For the DP spec, please don't invent the names, use the ones from the
> spec. At most drop excess stuff from the end.
In edp 1.4b spec , the register name 2009 is "DEBUG 0 SYNCHRONIZATION 
LATENCY SINK "  and bit 0:3 "MAX RE-SYNC FRAME COUNT"
>
> #define DP_SYNCHRONIZATION_LATENCY_IN_SINK
> # define DP_MAX_RESYNC_FRAME_COUNT_SHIFT
> # define DP_MAX_RESYNC_FRAME_COUNT_MASK
>
> And while at it, please add the full register contents.
>
> BR,
> Jani.
>
>> +
>>   #define DP_RECEIVER_ALPM_STATUS		    0x200b  /* eDP 1.4 */
>>   # define DP_ALPM_LOCK_TIMEOUT_ERROR	    (1 << 0)
Rodrigo Vivi Sept. 25, 2017, 5:05 p.m. UTC | #3
On Mon, Sep 25, 2017 at 09:01:38AM +0000, vathsala nagaraju wrote:
> On Monday 25 September 2017 01:53 PM, Jani Nikula wrote:
> 
>     On Sat, 23 Sep 2017, vathsala nagaraju <vathsala.nagaraju@intel.com> wrote:
> 
>         Add defines for dpcd register 2009 (synchronization latency
>         in sink).
> 
>         Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>         CC: Puthikorn Voravootivat <puthik@chromium.org>
>         Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>         Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
>         ---
>          include/drm/drm_dp_helper.h | 3 +++
>          1 file changed, 3 insertions(+)
> 
>         diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
>         index 11c39f1..846004e6 100644
>         --- a/include/drm/drm_dp_helper.h
>         +++ b/include/drm/drm_dp_helper.h
>         @@ -735,6 +735,9 @@
>          # define DP_PSR_SINK_INTERNAL_ERROR         7
>          # define DP_PSR_SINK_STATE_MASK             0x07
> 
>         +#define DP_SINK_SYNCHRONIZATION_LATENCY            0x2009
>         +# define DP_MAX_RESYNC_FRAME_CNT_MASK      0xf
> 
>     For the DP spec, please don't invent the names, use the ones from the
>     spec. At most drop excess stuff from the end.
> 
> In edp 1.4b spec , the register name 2009 is "DEBUG 0 SYNCHRONIZATION LATENCY SINK "  and
> bit 0:3 "MAX RE-SYNC FRAME COUNT"

probably he meant something like:

# define DP_SYNCHRONIZATION_LATENCY_IN_SINK            0x2009
# define DP_MAX_RESYNC_FRAME_COUNT_MASK      0xf

but he is the best one to confirm that...

> 
> 
>     #define DP_SYNCHRONIZATION_LATENCY_IN_SINK
>     # define DP_MAX_RESYNC_FRAME_COUNT_SHIFT
>     # define DP_MAX_RESYNC_FRAME_COUNT_MASK
> 
>     And while at it, please add the full register contents.
> 
>     BR,
>     Jani.
> 
> 
>         +
>          #define DP_RECEIVER_ALPM_STATUS                    0x200b  /* eDP 1.4 */
>          # define DP_ALPM_LOCK_TIMEOUT_ERROR        (1 << 0)
> 
>
Jani Nikula Sept. 25, 2017, 5:34 p.m. UTC | #4
On Mon, 25 Sep 2017, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Mon, Sep 25, 2017 at 09:01:38AM +0000, vathsala nagaraju wrote:
>> On Monday 25 September 2017 01:53 PM, Jani Nikula wrote:
>> 
>>     On Sat, 23 Sep 2017, vathsala nagaraju <vathsala.nagaraju@intel.com> wrote:
>> 
>>         Add defines for dpcd register 2009 (synchronization latency
>>         in sink).
>> 
>>         Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>         CC: Puthikorn Voravootivat <puthik@chromium.org>
>>         Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>         Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
>>         ---
>>          include/drm/drm_dp_helper.h | 3 +++
>>          1 file changed, 3 insertions(+)
>> 
>>         diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
>>         index 11c39f1..846004e6 100644
>>         --- a/include/drm/drm_dp_helper.h
>>         +++ b/include/drm/drm_dp_helper.h
>>         @@ -735,6 +735,9 @@
>>          # define DP_PSR_SINK_INTERNAL_ERROR         7
>>          # define DP_PSR_SINK_STATE_MASK             0x07
>> 
>>         +#define DP_SINK_SYNCHRONIZATION_LATENCY            0x2009
>>         +# define DP_MAX_RESYNC_FRAME_CNT_MASK      0xf
>> 
>>     For the DP spec, please don't invent the names, use the ones from the
>>     spec. At most drop excess stuff from the end.
>> 
>> In edp 1.4b spec , the register name 2009 is "DEBUG 0 SYNCHRONIZATION LATENCY SINK "  and
>> bit 0:3 "MAX RE-SYNC FRAME COUNT"
>
> probably he meant something like:
>
> # define DP_SYNCHRONIZATION_LATENCY_IN_SINK            0x2009
> # define DP_MAX_RESYNC_FRAME_COUNT_MASK      0xf
>
> but he is the best one to confirm that...

I wrote exactly that in my review, see below.

BR,
Jani.

>
>> 
>> 
>>     #define DP_SYNCHRONIZATION_LATENCY_IN_SINK
>>     # define DP_MAX_RESYNC_FRAME_COUNT_SHIFT
>>     # define DP_MAX_RESYNC_FRAME_COUNT_MASK
>> 
>>     And while at it, please add the full register contents.
>> 
>>     BR,
>>     Jani.
>> 
>> 
>>         +
>>          #define DP_RECEIVER_ALPM_STATUS                    0x200b  /* eDP 1.4 */
>>          # define DP_ALPM_LOCK_TIMEOUT_ERROR        (1 << 0)
>> 
>>
Daniel Vetter Sept. 26, 2017, 8:03 a.m. UTC | #5
On Mon, Sep 25, 2017 at 11:23:26AM +0300, Jani Nikula wrote:
> On Sat, 23 Sep 2017, vathsala nagaraju <vathsala.nagaraju@intel.com> wrote:
> > Add defines for dpcd register 2009 (synchronization latency
> > in sink).
> >
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > CC: Puthikorn Voravootivat <puthik@chromium.org>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
> > ---
> >  include/drm/drm_dp_helper.h | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> > index 11c39f1..846004e6 100644
> > --- a/include/drm/drm_dp_helper.h
> > +++ b/include/drm/drm_dp_helper.h
> > @@ -735,6 +735,9 @@
> >  # define DP_PSR_SINK_INTERNAL_ERROR         7
> >  # define DP_PSR_SINK_STATE_MASK             0x07
> >  
> > +#define DP_SINK_SYNCHRONIZATION_LATENCY	    0x2009
> > +# define DP_MAX_RESYNC_FRAME_CNT_MASK	    0xf
> 
> For the DP spec, please don't invent the names, use the ones from the
> spec. At most drop excess stuff from the end.
> 
> #define DP_SYNCHRONIZATION_LATENCY_IN_SINK
> # define DP_MAX_RESYNC_FRAME_COUNT_SHIFT
> # define DP_MAX_RESYNC_FRAME_COUNT_MASK
> 
> And while at it, please add the full register contents.

Please also annotate in which version of the spec we can find this, e.g.

#define DP_SYNCHRONIZATION_LATENCY_IN_SINK	/* eDP 1.4b */
# define DP_MAX_RESYNC_FRAME_COUNT_SHIFT
# define DP_MAX_RESYNC_FRAME_COUNT_MASK

Bringing this up since previous versions of this confused Rodrigo
-Daniel

> 
> BR,
> Jani.
> 
> > +
> >  #define DP_RECEIVER_ALPM_STATUS		    0x200b  /* eDP 1.4 */
> >  # define DP_ALPM_LOCK_TIMEOUT_ERROR	    (1 << 0)
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 11c39f1..846004e6 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -735,6 +735,9 @@ 
 # define DP_PSR_SINK_INTERNAL_ERROR         7
 # define DP_PSR_SINK_STATE_MASK             0x07
 
+#define DP_SINK_SYNCHRONIZATION_LATENCY	    0x2009
+# define DP_MAX_RESYNC_FRAME_CNT_MASK	    0xf
+
 #define DP_RECEIVER_ALPM_STATUS		    0x200b  /* eDP 1.4 */
 # define DP_ALPM_LOCK_TIMEOUT_ERROR	    (1 << 0)