Re: [Intel-gfx] [PATCH 03/11] drm/i915/display/dp: Attach and set drm connector VRR property

2020-12-03 Thread Navare, Manasi
On Thu, Dec 03, 2020 at 06:37:46PM +0200, Jani Nikula wrote:
> On Tue, 01 Dec 2020, "Navare, Manasi"  wrote:
> > On Tue, Nov 10, 2020 at 12:41:07PM +0200, Jani Nikula wrote:
> >> On Thu, 22 Oct 2020, Manasi Navare  wrote:
> >> > +
> >> > +if (INTEL_GEN(dev_priv) >= 12)
> >> 
> >> I wonder if we should just add a wrapper
> >> 
> >> #define HAS_VRR(i915) (INTEL_GEN(i915) >= 12)
> >> 
> >> to be more descriptive. And use it in the previous patch too.
> >
> > Yea I like the idea of adding this wrapper in intel_vrr.c and have the 
> > platform check in that
> > and then use that in intel_vrr_is_capable() ?
> 
> Works for me, but might just throw that in i915_drv.h with all the other
> HAS_ helpers also. *shrug*

Yup, thats where I added HAS_VRR macro

Manasi

> 
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 03/11] drm/i915/display/dp: Attach and set drm connector VRR property

2020-12-03 Thread Jani Nikula
On Tue, 01 Dec 2020, "Navare, Manasi"  wrote:
> On Tue, Nov 10, 2020 at 12:41:07PM +0200, Jani Nikula wrote:
>> On Thu, 22 Oct 2020, Manasi Navare  wrote:
>> > +
>> > +  if (INTEL_GEN(dev_priv) >= 12)
>> 
>> I wonder if we should just add a wrapper
>> 
>> #define HAS_VRR(i915) (INTEL_GEN(i915) >= 12)
>> 
>> to be more descriptive. And use it in the previous patch too.
>
> Yea I like the idea of adding this wrapper in intel_vrr.c and have the 
> platform check in that
> and then use that in intel_vrr_is_capable() ?

Works for me, but might just throw that in i915_drv.h with all the other
HAS_ helpers also. *shrug*


-- 
Jani Nikula, Intel Open Source Graphics Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 03/11] drm/i915/display/dp: Attach and set drm connector VRR property

2020-12-01 Thread Navare, Manasi
On Tue, Nov 10, 2020 at 12:41:07PM +0200, Jani Nikula wrote:
> On Thu, 22 Oct 2020, Manasi Navare  wrote:
> > From: Aditya Swarup 
> >
> > This function sets the VRR property for connector based
> > on the platform support, EDID monitor range and DP sink
> > DPCD capability of outputing video without msa
> > timing information.
> >
> > v7:
> > * Move the helper to separate file (Manasi)
> > v6:
> > * Remove unset of prop
> > v5:
> > * Fix the vrr prop not being set in kernel (Manasi)
> > * Unset the prop on connector disconnect (Manasi)
> > v4:
> > * Rebase (Mansi)
> > v3:
> > * intel_dp_is_vrr_capable can be used for debugfs, make it
> > non static (Manasi)
> > v2:
> > * Just set this in intel_dp_get_modes instead of new hook (Jani)
> >
> > Cc: Ville Syrjälä 
> > Cc: Jani Nikula 
> > Signed-off-by: Aditya Swarup 
> > Signed-off-by: Manasi Navare 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp.c | 8 
> >  drivers/gpu/drm/i915/display/intel_dp.h | 1 +
> >  2 files changed, 9 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> > b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 818daab252f3..3794b8f35edc 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -62,6 +62,7 @@
> >  #include "intel_sideband.h"
> >  #include "intel_tc.h"
> >  #include "intel_vdsc.h"
> > +#include "intel_vrr.h"
> >  
> >  #define DP_DPRX_ESI_LEN 14
> >  
> > @@ -6622,6 +6623,10 @@ static int intel_dp_get_modes(struct drm_connector 
> > *connector)
> > edid = intel_connector->detect_edid;
> > if (edid) {
> > int ret = intel_connector_update_modes(connector, edid);
> > +
> > +   if (intel_is_vrr_capable(connector))
> > +   drm_connector_set_vrr_capable_property(connector,
> > +  true);
> > if (ret)
> > return ret;
> > }
> > @@ -7080,6 +7085,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, 
> > struct drm_connector *connect
> > connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
> >  
> > }
> > +
> > +   if (INTEL_GEN(dev_priv) >= 12)
> 
> I wonder if we should just add a wrapper
> 
> #define HAS_VRR(i915) (INTEL_GEN(i915) >= 12)
> 
> to be more descriptive. And use it in the previous patch too.

Yea I like the idea of adding this wrapper in intel_vrr.c and have the platform 
check in that
and then use that in intel_vrr_is_capable() ?

> 
> > +   drm_connector_attach_vrr_capable_property(connector);
> >  }
> >  
> >  static void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp)
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
> > b/drivers/gpu/drm/i915/display/intel_dp.h
> > index 3f862b4fd34f..aaf0a41582d7 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> > @@ -15,6 +15,7 @@ enum pipe;
> >  enum port;
> >  struct drm_connector_state;
> >  struct drm_encoder;
> > +struct drm_connector;
> 
> Unrelated change.

Yea I dont rem now why I added that here probably unrelated will remove

Manasi

> 
> >  struct drm_i915_private;
> >  struct drm_modeset_acquire_ctx;
> >  struct drm_dp_vsc_sdp;
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 03/11] drm/i915/display/dp: Attach and set drm connector VRR property

2020-11-10 Thread Jani Nikula
On Thu, 22 Oct 2020, Manasi Navare  wrote:
> From: Aditya Swarup 
>
> This function sets the VRR property for connector based
> on the platform support, EDID monitor range and DP sink
> DPCD capability of outputing video without msa
> timing information.
>
> v7:
> * Move the helper to separate file (Manasi)
> v6:
> * Remove unset of prop
> v5:
> * Fix the vrr prop not being set in kernel (Manasi)
> * Unset the prop on connector disconnect (Manasi)
> v4:
> * Rebase (Mansi)
> v3:
> * intel_dp_is_vrr_capable can be used for debugfs, make it
> non static (Manasi)
> v2:
> * Just set this in intel_dp_get_modes instead of new hook (Jani)
>
> Cc: Ville Syrjälä 
> Cc: Jani Nikula 
> Signed-off-by: Aditya Swarup 
> Signed-off-by: Manasi Navare 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 8 
>  drivers/gpu/drm/i915/display/intel_dp.h | 1 +
>  2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 818daab252f3..3794b8f35edc 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -62,6 +62,7 @@
>  #include "intel_sideband.h"
>  #include "intel_tc.h"
>  #include "intel_vdsc.h"
> +#include "intel_vrr.h"
>  
>  #define DP_DPRX_ESI_LEN 14
>  
> @@ -6622,6 +6623,10 @@ static int intel_dp_get_modes(struct drm_connector 
> *connector)
>   edid = intel_connector->detect_edid;
>   if (edid) {
>   int ret = intel_connector_update_modes(connector, edid);
> +
> + if (intel_is_vrr_capable(connector))
> + drm_connector_set_vrr_capable_property(connector,
> +true);
>   if (ret)
>   return ret;
>   }
> @@ -7080,6 +7085,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, 
> struct drm_connector *connect
>   connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
>  
>   }
> +
> + if (INTEL_GEN(dev_priv) >= 12)

I wonder if we should just add a wrapper

#define HAS_VRR(i915) (INTEL_GEN(i915) >= 12)

to be more descriptive. And use it in the previous patch too.

> + drm_connector_attach_vrr_capable_property(connector);
>  }
>  
>  static void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp)
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
> b/drivers/gpu/drm/i915/display/intel_dp.h
> index 3f862b4fd34f..aaf0a41582d7 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -15,6 +15,7 @@ enum pipe;
>  enum port;
>  struct drm_connector_state;
>  struct drm_encoder;
> +struct drm_connector;

Unrelated change.

>  struct drm_i915_private;
>  struct drm_modeset_acquire_ctx;
>  struct drm_dp_vsc_sdp;

-- 
Jani Nikula, Intel Open Source Graphics Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 03/11] drm/i915/display/dp: Attach and set drm connector VRR property

2020-10-22 Thread Manasi Navare
From: Aditya Swarup 

This function sets the VRR property for connector based
on the platform support, EDID monitor range and DP sink
DPCD capability of outputing video without msa
timing information.

v7:
* Move the helper to separate file (Manasi)
v6:
* Remove unset of prop
v5:
* Fix the vrr prop not being set in kernel (Manasi)
* Unset the prop on connector disconnect (Manasi)
v4:
* Rebase (Mansi)
v3:
* intel_dp_is_vrr_capable can be used for debugfs, make it
non static (Manasi)
v2:
* Just set this in intel_dp_get_modes instead of new hook (Jani)

Cc: Ville Syrjälä 
Cc: Jani Nikula 
Signed-off-by: Aditya Swarup 
Signed-off-by: Manasi Navare 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 8 
 drivers/gpu/drm/i915/display/intel_dp.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 818daab252f3..3794b8f35edc 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -62,6 +62,7 @@
 #include "intel_sideband.h"
 #include "intel_tc.h"
 #include "intel_vdsc.h"
+#include "intel_vrr.h"
 
 #define DP_DPRX_ESI_LEN 14
 
@@ -6622,6 +6623,10 @@ static int intel_dp_get_modes(struct drm_connector 
*connector)
edid = intel_connector->detect_edid;
if (edid) {
int ret = intel_connector_update_modes(connector, edid);
+
+   if (intel_is_vrr_capable(connector))
+   drm_connector_set_vrr_capable_property(connector,
+  true);
if (ret)
return ret;
}
@@ -7080,6 +7085,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct 
drm_connector *connect
connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
 
}
+
+   if (INTEL_GEN(dev_priv) >= 12)
+   drm_connector_attach_vrr_capable_property(connector);
 }
 
 static void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index 3f862b4fd34f..aaf0a41582d7 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -15,6 +15,7 @@ enum pipe;
 enum port;
 struct drm_connector_state;
 struct drm_encoder;
+struct drm_connector;
 struct drm_i915_private;
 struct drm_modeset_acquire_ctx;
 struct drm_dp_vsc_sdp;
-- 
2.19.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx