diff mbox

[04/10] drm/uapi: Deprecate DRM_MODE_FLAG_BCAST

Message ID 20171114183258.16976-5-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Nov. 14, 2017, 6:32 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reject any mode with DRM_MODE_FLAG_BCAST. We have no code that even
checks for this flag hence it can't possibly do any good.

I think this maybe originated from fbdev where it was supposed to
indicate PAL/NTSC broadcast timings. I have no idea why those would
have to be identified by a flag rather than by just the timings
themselves. And then I assume it got copied into xfree86 for
fbdevhw, and later on it leaked into the randr protocol and kms uapi.

Since kms fbdev emulation never uses the corresponding fbdev flag
there should be no sane way for this to come back into kms via
userspace either.

Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Adam Jackson <ajax@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 include/drm/drm_modes.h     | 2 +-
 include/uapi/drm/drm_mode.h | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Alex Deucher Nov. 14, 2017, 7:13 p.m. UTC | #1
On Tue, Nov 14, 2017 at 1:32 PM, Ville Syrjala
<ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Reject any mode with DRM_MODE_FLAG_BCAST. We have no code that even
> checks for this flag hence it can't possibly do any good.
>
> I think this maybe originated from fbdev where it was supposed to
> indicate PAL/NTSC broadcast timings. I have no idea why those would
> have to be identified by a flag rather than by just the timings
> themselves. And then I assume it got copied into xfree86 for
> fbdevhw, and later on it leaked into the randr protocol and kms uapi.
>
> Since kms fbdev emulation never uses the corresponding fbdev flag
> there should be no sane way for this to come back into kms via
> userspace either.
>
> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
> Cc: Adam Jackson <ajax@redhat.com>
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  include/drm/drm_modes.h     | 2 +-
>  include/uapi/drm/drm_mode.h | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> index bce573375dd8..09773e766e1f 100644
> --- a/include/drm/drm_modes.h
> +++ b/include/drm/drm_modes.h
> @@ -299,7 +299,7 @@ struct drm_display_mode {
>          *  - DRM_MODE_FLAG_PCSYNC: composite sync is active high.
>          *  - DRM_MODE_FLAG_NCSYNC: composite sync is active low.
>          *  - DRM_MODE_FLAG_HSKEW: hskew provided (not used?).
> -        *  - DRM_MODE_FLAG_BCAST: not used?
> +        *  - DRM_MODE_FLAG_BCAST: <deprecated>
>          *  - DRM_MODE_FLAG_PIXMUX: <deprecated>
>          *  - DRM_MODE_FLAG_DBLCLK: double-clocked mode.
>          *  - DRM_MODE_FLAG_CLKDIV2: half-clocked mode.
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 8d872e17223e..a7cded1c43e8 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -74,7 +74,7 @@ extern "C" {
>  #define DRM_MODE_FLAG_PCSYNC                   (1<<7)
>  #define DRM_MODE_FLAG_NCSYNC                   (1<<8)
>  #define DRM_MODE_FLAG_HSKEW                    (1<<9) /* hskew provided */
> -#define DRM_MODE_FLAG_BCAST                    (1<<10)
> +#define DRM_MODE_FLAG_BCAST                    (1<<10) /* deprecated */
>  #define DRM_MODE_FLAG_PIXMUX                   (1<<11) /* deprecated */
>  #define DRM_MODE_FLAG_DBLCLK                   (1<<12)
>  #define DRM_MODE_FLAG_CLKDIV2                  (1<<13)
> @@ -117,7 +117,6 @@ extern "C" {
>                                  DRM_MODE_FLAG_PCSYNC |         \
>                                  DRM_MODE_FLAG_NCSYNC |         \
>                                  DRM_MODE_FLAG_HSKEW |          \
> -                                DRM_MODE_FLAG_BCAST |          \
>                                  DRM_MODE_FLAG_DBLCLK |         \
>                                  DRM_MODE_FLAG_CLKDIV2 |        \
>                                  DRM_MODE_FLAG_3D_MASK)
> --
> 2.13.6
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Jose Abreu Nov. 15, 2017, 6:05 p.m. UTC | #2
On 14-11-2017 18:32, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Reject any mode with DRM_MODE_FLAG_BCAST. We have no code that even
> checks for this flag hence it can't possibly do any good.
>
> I think this maybe originated from fbdev where it was supposed to
> indicate PAL/NTSC broadcast timings. I have no idea why those would
> have to be identified by a flag rather than by just the timings
> themselves. And then I assume it got copied into xfree86 for
> fbdevhw, and later on it leaked into the randr protocol and kms uapi.
>
> Since kms fbdev emulation never uses the corresponding fbdev flag
> there should be no sane way for this to come back into kms via
> userspace either.
>
> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
> Cc: Adam Jackson <ajax@redhat.com>
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>

Reviewed-by: Jose Abreu <joabreu@synopsys.com>

Best Regards,
Jose Miguel Abreu
diff mbox

Patch

diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index bce573375dd8..09773e766e1f 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -299,7 +299,7 @@  struct drm_display_mode {
 	 *  - DRM_MODE_FLAG_PCSYNC: composite sync is active high.
 	 *  - DRM_MODE_FLAG_NCSYNC: composite sync is active low.
 	 *  - DRM_MODE_FLAG_HSKEW: hskew provided (not used?).
-	 *  - DRM_MODE_FLAG_BCAST: not used?
+	 *  - DRM_MODE_FLAG_BCAST: <deprecated>
 	 *  - DRM_MODE_FLAG_PIXMUX: <deprecated>
 	 *  - DRM_MODE_FLAG_DBLCLK: double-clocked mode.
 	 *  - DRM_MODE_FLAG_CLKDIV2: half-clocked mode.
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 8d872e17223e..a7cded1c43e8 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -74,7 +74,7 @@  extern "C" {
 #define DRM_MODE_FLAG_PCSYNC			(1<<7)
 #define DRM_MODE_FLAG_NCSYNC			(1<<8)
 #define DRM_MODE_FLAG_HSKEW			(1<<9) /* hskew provided */
-#define DRM_MODE_FLAG_BCAST			(1<<10)
+#define DRM_MODE_FLAG_BCAST			(1<<10) /* deprecated */
 #define DRM_MODE_FLAG_PIXMUX			(1<<11) /* deprecated */
 #define DRM_MODE_FLAG_DBLCLK			(1<<12)
 #define DRM_MODE_FLAG_CLKDIV2			(1<<13)
@@ -117,7 +117,6 @@  extern "C" {
 				 DRM_MODE_FLAG_PCSYNC |		\
 				 DRM_MODE_FLAG_NCSYNC |		\
 				 DRM_MODE_FLAG_HSKEW |		\
-				 DRM_MODE_FLAG_BCAST |		\
 				 DRM_MODE_FLAG_DBLCLK |		\
 				 DRM_MODE_FLAG_CLKDIV2 |	\
 				 DRM_MODE_FLAG_3D_MASK)