[QXL,2/2] Make output names match modsetting driver

Submitted by Jonathon Jongsma on Oct. 25, 2018, 3:36 p.m.

Details

Message ID 20181025153659.29369-2-jjongsma@redhat.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Jonathon Jongsma Oct. 25, 2018, 3:36 p.m.
The xrandr output name used by the QXL driver is based on the drm
connector type, but the names do not match the kernel names (see
/drivers/gpu/drm/drm_connector.c) or the modsetting driver names (see
hw/xfree86/drivers/modesetting/drmmode_display.c). Making these more
consistent will require less driver-specific special-case code if a user
wants to match an xrandr output to a drm connector.

Note that this patch should not actually change any behavior, since the
QXL driver only uses the 'Virtual' connector type, so this is done only
for consistency.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
 src/qxl_drmmode.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/qxl_drmmode.c b/src/qxl_drmmode.c
index a814859..0f95499 100644
--- a/src/qxl_drmmode.c
+++ b/src/qxl_drmmode.c
@@ -722,20 +722,22 @@  static int subpixel_conv_table[7] = { 0, SubPixelUnknown,
 
 const char *output_names[] = { "None",
 			       "VGA",
-			       "DVI",
-			       "DVI",
-			       "DVI",
+			       "DVI-I",
+			       "DVI-D",
+			       "DVI-A",
 			       "Composite",
-			       "S-video",
+			       "SVIDEO",
 			       "LVDS",
-			       "CTV",
+			       "Component",
 			       "DIN",
-			       "DisplayPort",
-			       "HDMI",
+			       "DP",
 			       "HDMI",
+			       "HDMI-B",
 			       "TV",
 			       "eDP",
-			       "Virtual"
+			       "Virtual",
+			       "DSI",
+			       "DPI",
 };
 
 static void

Comments

Frediano Ziglio Oct. 26, 2018, 4:48 p.m.
Typo in title "modesetting"

> 
> The xrandr output name used by the QXL driver is based on the drm
> connector type, but the names do not match the kernel names (see
> /drivers/gpu/drm/drm_connector.c) or the modsetting driver names (see

Similar here

> hw/xfree86/drivers/modesetting/drmmode_display.c). Making these more
> consistent will require less driver-specific special-case code if a user
> wants to match an xrandr output to a drm connector.
> 
> Note that this patch should not actually change any behavior, since the
> QXL driver only uses the 'Virtual' connector type, so this is done only
> for consistency.
> 
> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
> ---
>  src/qxl_drmmode.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/src/qxl_drmmode.c b/src/qxl_drmmode.c
> index a814859..0f95499 100644
> --- a/src/qxl_drmmode.c
> +++ b/src/qxl_drmmode.c
> @@ -722,20 +722,22 @@ static int subpixel_conv_table[7] = { 0,
> SubPixelUnknown,
>  
>  const char *output_names[] = { "None",
>  			       "VGA",
> -			       "DVI",
> -			       "DVI",
> -			       "DVI",
> +			       "DVI-I",
> +			       "DVI-D",
> +			       "DVI-A",
>  			       "Composite",
> -			       "S-video",
> +			       "SVIDEO",
>  			       "LVDS",
> -			       "CTV",
> +			       "Component",
>  			       "DIN",
> -			       "DisplayPort",
> -			       "HDMI",
> +			       "DP",
>  			       "HDMI",
> +			       "HDMI-B",
>  			       "TV",
>  			       "eDP",
> -			       "Virtual"
> +			       "Virtual",
> +			       "DSI",
> +			       "DPI",
>  };
>  
>  static void

Surely OT, I would change the indentation to

const char *output_names[] = {
    "None",
    "VGA",

and possibly have

static const char *const output_names[] = {


Otherwise,

Acked-by: Frediano Ziglio <fziglio@redhat.com>

Frediano