diff mbox series

[v4,1/2] drm/edid: Name the detailed monitor range flags

Message ID 20200306014220.20029-1-manasi.d.navare@intel.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/2] drm/edid: Name the detailed monitor range flags | expand

Commit Message

Navare, Manasi March 6, 2020, 1:42 a.m. UTC
This patch adds defines for the detailed monitor
range flags as per the EDID specification.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
Cc: Kazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 include/drm/drm_edid.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jani Nikula March 6, 2020, 10:30 a.m. UTC | #1
On Thu, 05 Mar 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> This patch adds defines for the detailed monitor
> range flags as per the EDID specification.
>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
> Cc: Kazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  include/drm/drm_edid.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> index f0b03d401c27..f89c97623845 100644
> --- a/include/drm/drm_edid.h
> +++ b/include/drm/drm_edid.h
> @@ -91,6 +91,11 @@ struct detailed_data_string {
>  	u8 str[13];
>  } __attribute__((packed));
>  
> +#define EDID_DEFAULT_GTF_SUPPORT_FLAG   0x00
> +#define EDID_RANGE_LIMITS_ONLY_FLAG     0x01
> +#define EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02
> +#define EDID_CVT_SUPPORT_FLAG           0x04

Bikeshed for consideration:

drm_edid.h has some macros with DRM_EDID_ prefix, some with EDID_
prefix, and then some with no prefix at all really. Should we start
consolidating on something when we add more?

BR,
Jani.


> +
>  struct detailed_data_monitor_range {
>  	u8 min_vfreq;
>  	u8 max_vfreq;
Navare, Manasi March 6, 2020, 6:40 p.m. UTC | #2
On Fri, Mar 06, 2020 at 12:30:46PM +0200, Jani Nikula wrote:
> On Thu, 05 Mar 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> > This patch adds defines for the detailed monitor
> > range flags as per the EDID specification.
> >
> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Harry Wentland <harry.wentland@amd.com>
> > Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
> > Cc: Kazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> >  include/drm/drm_edid.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> > index f0b03d401c27..f89c97623845 100644
> > --- a/include/drm/drm_edid.h
> > +++ b/include/drm/drm_edid.h
> > @@ -91,6 +91,11 @@ struct detailed_data_string {
> >  	u8 str[13];
> >  } __attribute__((packed));
> >  
> > +#define EDID_DEFAULT_GTF_SUPPORT_FLAG   0x00
> > +#define EDID_RANGE_LIMITS_ONLY_FLAG     0x01
> > +#define EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02
> > +#define EDID_CVT_SUPPORT_FLAG           0x04
> 
> Bikeshed for consideration:
> 
> drm_edid.h has some macros with DRM_EDID_ prefix, some with EDID_
> prefix, and then some with no prefix at all really. Should we start
> consolidating on something when we add more?
>

Yes Jani I did notice the same thing and didnt know which convention
to continue to follow but I noticed that majority of the defines were
just EDID_ so just used that for these new defines.

Is there a particular way you wish to consolidate this and use a specific
convention for #defines?

I can atleast change these new defines based on a preferred convention and then
separate patches to change the rest in .h and corresponding usages in .c files.

Regards
Manasi
 
> BR,
> Jani.
> 
> 
> > +
> >  struct detailed_data_monitor_range {
> >  	u8 min_vfreq;
> >  	u8 max_vfreq;
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
Jani Nikula March 9, 2020, 8:35 a.m. UTC | #3
On Fri, 06 Mar 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> On Fri, Mar 06, 2020 at 12:30:46PM +0200, Jani Nikula wrote:
>> On Thu, 05 Mar 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
>> > This patch adds defines for the detailed monitor
>> > range flags as per the EDID specification.
>> >
>> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> > Cc: Harry Wentland <harry.wentland@amd.com>
>> > Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
>> > Cc: Kazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
>> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
>> > ---
>> >  include/drm/drm_edid.h | 5 +++++
>> >  1 file changed, 5 insertions(+)
>> >
>> > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
>> > index f0b03d401c27..f89c97623845 100644
>> > --- a/include/drm/drm_edid.h
>> > +++ b/include/drm/drm_edid.h
>> > @@ -91,6 +91,11 @@ struct detailed_data_string {
>> >  	u8 str[13];
>> >  } __attribute__((packed));
>> >  
>> > +#define EDID_DEFAULT_GTF_SUPPORT_FLAG   0x00
>> > +#define EDID_RANGE_LIMITS_ONLY_FLAG     0x01
>> > +#define EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02
>> > +#define EDID_CVT_SUPPORT_FLAG           0x04
>> 
>> Bikeshed for consideration:
>> 
>> drm_edid.h has some macros with DRM_EDID_ prefix, some with EDID_
>> prefix, and then some with no prefix at all really. Should we start
>> consolidating on something when we add more?
>>
>
> Yes Jani I did notice the same thing and didnt know which convention
> to continue to follow but I noticed that majority of the defines were
> just EDID_ so just used that for these new defines.

Ah, look again, DRM_EDID_ trumps EDID_ 51 to 15.

> Is there a particular way you wish to consolidate this and use a specific
> convention for #defines?
>
> I can atleast change these new defines based on a preferred convention and then
> separate patches to change the rest in .h and corresponding usages in .c files.

I'd suggest DRM_EDID_ for new ones, perhaps eventually rename old ones.

BR,
Jani.


>
> Regards
> Manasi
>  
>> BR,
>> Jani.
>> 
>> 
>> > +
>> >  struct detailed_data_monitor_range {
>> >  	u8 min_vfreq;
>> >  	u8 max_vfreq;
>> 
>> -- 
>> Jani Nikula, Intel Open Source Graphics Center
Navare, Manasi March 9, 2020, 8:34 p.m. UTC | #4
On Mon, Mar 09, 2020 at 10:35:52AM +0200, Jani Nikula wrote:
> On Fri, 06 Mar 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> > On Fri, Mar 06, 2020 at 12:30:46PM +0200, Jani Nikula wrote:
> >> On Thu, 05 Mar 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> >> > This patch adds defines for the detailed monitor
> >> > range flags as per the EDID specification.
> >> >
> >> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> > Cc: Harry Wentland <harry.wentland@amd.com>
> >> > Cc: Clinton A Taylor <clinton.a.taylor@intel.com>
> >> > Cc: Kazlauskas Nicholas <Nicholas.Kazlauskas@amd.com>
> >> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> >> > ---
> >> >  include/drm/drm_edid.h | 5 +++++
> >> >  1 file changed, 5 insertions(+)
> >> >
> >> > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> >> > index f0b03d401c27..f89c97623845 100644
> >> > --- a/include/drm/drm_edid.h
> >> > +++ b/include/drm/drm_edid.h
> >> > @@ -91,6 +91,11 @@ struct detailed_data_string {
> >> >  	u8 str[13];
> >> >  } __attribute__((packed));
> >> >  
> >> > +#define EDID_DEFAULT_GTF_SUPPORT_FLAG   0x00
> >> > +#define EDID_RANGE_LIMITS_ONLY_FLAG     0x01
> >> > +#define EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02
> >> > +#define EDID_CVT_SUPPORT_FLAG           0x04
> >> 
> >> Bikeshed for consideration:
> >> 
> >> drm_edid.h has some macros with DRM_EDID_ prefix, some with EDID_
> >> prefix, and then some with no prefix at all really. Should we start
> >> consolidating on something when we add more?
> >>
> >
> > Yes Jani I did notice the same thing and didnt know which convention
> > to continue to follow but I noticed that majority of the defines were
> > just EDID_ so just used that for these new defines.
> 
> Ah, look again, DRM_EDID_ trumps EDID_ 51 to 15.
> 
> > Is there a particular way you wish to consolidate this and use a specific
> > convention for #defines?
> >
> > I can atleast change these new defines based on a preferred convention and then
> > separate patches to change the rest in .h and corresponding usages in .c files.
> 
> I'd suggest DRM_EDID_ for new ones, perhaps eventually rename old ones.

Okay cool, I will rename this to be DRM_EDID_ and then work on renaming others later
Thanks for pointing this out.

Regards
Manasi

> 
> BR,
> Jani.
> 
> 
> >
> > Regards
> > Manasi
> >  
> >> BR,
> >> Jani.
> >> 
> >> 
> >> > +
> >> >  struct detailed_data_monitor_range {
> >> >  	u8 min_vfreq;
> >> >  	u8 max_vfreq;
> >> 
> >> -- 
> >> Jani Nikula, Intel Open Source Graphics Center
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
diff mbox series

Patch

diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index f0b03d401c27..f89c97623845 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -91,6 +91,11 @@  struct detailed_data_string {
 	u8 str[13];
 } __attribute__((packed));
 
+#define EDID_DEFAULT_GTF_SUPPORT_FLAG   0x00
+#define EDID_RANGE_LIMITS_ONLY_FLAG     0x01
+#define EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02
+#define EDID_CVT_SUPPORT_FLAG           0x04
+
 struct detailed_data_monitor_range {
 	u8 min_vfreq;
 	u8 max_vfreq;