Closed substring closed 2 years ago
We should already be printing this property, we don't need to do anything extra here.
I'm afraid not
[arcade@GroovyArcade ~]$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux-15khz root=/dev/disk/by-label/GA rw quiet rd.udev.log-priority=3 splash mitigations=off audit=0 monitor=lcd fbcon=rotate:1 video=DP-1:panel_orientation=right_side_up,rotate=90 initrd=/amd-ucode.img,/initramfs-linux-15khz.img
[arcade@GroovyArcade ~]$ drm_info
Node: /dev/dri/card0
├───Driver: radeon (ATI Radeon) version 2.50.0 (20080528)
│ ├───DRM_CLIENT_CAP_STEREO_3D supported
│ ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES supported
│ ├───DRM_CLIENT_CAP_ATOMIC not supported
│ ├───DRM_CLIENT_CAP_ASPECT_RATIO supported
│ ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS not supported
│ ├───DRM_CAP_DUMB_BUFFER = 1
│ ├───DRM_CAP_VBLANK_HIGH_CRTC = 1
│ ├───DRM_CAP_DUMB_PREFERRED_DEPTH = 24
│ ├───DRM_CAP_DUMB_PREFER_SHADOW = 1
│ ├───DRM_CAP_PRIME = 3
│ ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│ ├───DRM_CAP_ASYNC_PAGE_FLIP = 1
│ ├───DRM_CAP_CURSOR_WIDTH = 128
│ ├───DRM_CAP_CURSOR_HEIGHT = 128
│ ├───DRM_CAP_ADDFB2_MODIFIERS = 0
│ ├───DRM_CAP_PAGE_FLIP_TARGET = 1
│ ├───DRM_CAP_CRTC_IN_VBLANK_EVENT = 1
│ ├───DRM_CAP_SYNCOBJ = 0
│ └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: PCI 1002:1313 Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]
│ └───Available nodes: primary, render
├───Framebuffer size
│ ├───Width: [0, 16384]
│ └───Height: [0, 16384]
├───Connectors
│ ├───Connector 0
│ │ ├───Object ID: 50
│ │ ├───Type: DisplayPort
│ │ ├───Status: connected
│ │ ├───Physical size: 700x390 mm
│ │ ├───Subpixel: horizontal RGB
│ │ ├───Encoders: {0}
│ │ ├───Modes
│ │ │ ├───1920x1080@60.00 preferred driver phsync pvsync
│ │ │ ├───4096x2160@30.00 driver phsync pvsync 256:135
│ │ │ ├───4096x2160@29.97 driver phsync pvsync 256:135
│ │ │ ├───3840x2160@30.00 driver phsync pvsync 16:9
│ │ │ ├───3840x2160@29.97 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@60.00 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@59.94 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@50.00 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@30.00 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@29.97 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@25.00 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@24.00 driver phsync pvsync 16:9
│ │ │ ├───1920x1080@23.98 driver phsync pvsync 16:9
│ │ │ ├───1600x1200@60.00 driver phsync pvsync
│ │ │ ├───1680x1050@59.95 driver nhsync pvsync
│ │ │ ├───1680x1050@59.88 driver phsync nvsync
│ │ │ ├───1400x1050@59.98 driver nhsync pvsync
│ │ │ ├───1400x1050@59.95 driver phsync nvsync
│ │ │ ├───1600x900@60.00 driver phsync pvsync
│ │ │ ├───1280x1024@60.02 driver phsync pvsync
│ │ │ ├───1440x900@59.89 driver nhsync pvsync
│ │ │ ├───1440x900@59.90 driver phsync nvsync
│ │ │ ├───1280x960@60.00 driver phsync pvsync
│ │ │ ├───1360x768@60.02 driver phsync pvsync
│ │ │ ├───1280x800@59.81 driver nhsync pvsync
│ │ │ ├───1280x768@60.35 driver nhsync nvsync
│ │ │ ├───1280x768@59.87 driver nhsync pvsync
│ │ │ ├───1280x720@60.00 driver phsync pvsync
│ │ │ ├───1280x720@60.00 driver phsync pvsync 16:9
│ │ │ ├───1280x720@59.94 driver phsync pvsync 16:9
│ │ │ ├───1280x720@50.00 driver phsync pvsync 16:9
│ │ │ ├───1280x720@30.00 driver phsync pvsync 16:9
│ │ │ ├───1280x720@29.97 driver phsync pvsync 16:9
│ │ │ ├───1280x720@25.00 driver phsync pvsync 16:9
│ │ │ ├───1280x720@24.00 driver phsync pvsync 16:9
│ │ │ ├───1280x720@23.98 driver phsync pvsync 16:9
│ │ │ ├───1024x768@60.00 driver nhsync nvsync
│ │ │ ├───800x600@60.32 driver phsync pvsync
│ │ │ ├───720x576@50.00 driver nhsync nvsync
│ │ │ ├───720x576@50.00 driver nhsync nvsync 4:3
│ │ │ ├───720x576@50.00 driver nhsync nvsync 16:9
│ │ │ ├───720x480@60.00 driver nhsync nvsync 4:3
│ │ │ ├───720x480@60.00 driver nhsync nvsync 16:9
│ │ │ ├───720x480@59.94 driver nhsync nvsync
│ │ │ ├───720x480@59.94 driver nhsync nvsync 4:3
│ │ │ ├───720x480@59.94 driver nhsync nvsync 16:9
│ │ │ ├───640x480@60.00 driver nhsync nvsync 4:3
│ │ │ ├───640x480@59.94 driver nhsync nvsync
│ │ │ └───640x480@59.94 driver nhsync nvsync 4:3
│ │ └───Properties
│ │ ├───"EDID" (immutable): blob = 57
│ │ ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│ │ ├───"link-status": enum {Good, Bad} = Good
│ │ ├───"non-desktop" (immutable): range [0, 1] = 0
│ │ ├───"TILE" (immutable): blob = 0
│ │ ├───"coherent": range [0, 1] = 1
│ │ ├───"underscan": enum {off, on, auto} = off
│ │ ├───"underscan hborder": range [0, 128] = 0
│ │ ├───"underscan vborder": range [0, 128] = 0
│ │ ├───"dither": enum {off, on} = off
│ │ ├───"scaling mode": enum {None, Full, Center, Full aspect} = None
│ │ ├───"audio": enum {off, on, auto} = auto
│ │ └───"output_csc": enum {bypass, tvrgb, ycbcr601, ycbcr709} = bypass
│ ├───Connector 1
│ │ ├───Object ID: 53
│ │ ├───Type: VGA
│ │ ├───Status: disconnected
│ │ ├───Encoders: {1, 2}
│ │ └───Properties
│ │ ├───"EDID" (immutable): blob = 0
│ │ ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│ │ ├───"link-status": enum {Good, Bad} = Good
│ │ ├───"non-desktop" (immutable): range [0, 1] = 0
│ │ ├───"TILE" (immutable): blob = 0
│ │ ├───"load detection": range [0, 1] = 1
│ │ ├───"scaling mode": enum {None, Full, Center, Full aspect} = None
│ │ └───"output_csc": enum {bypass, tvrgb, ycbcr601, ycbcr709} = bypass
│ └───Connector 2
│ ├───Object ID: 55
│ ├───Type: DisplayPort
│ ├───Status: disconnected
│ ├───Encoders: {3}
│ └───Properties
│ ├───"EDID" (immutable): blob = 0
│ ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│ ├───"link-status": enum {Good, Bad} = Good
│ ├───"non-desktop" (immutable): range [0, 1] = 0
│ ├───"TILE" (immutable): blob = 0
│ ├───"coherent": range [0, 1] = 1
│ ├───"underscan": enum {off, on, auto} = off
│ ├───"underscan hborder": range [0, 128] = 0
│ ├───"underscan vborder": range [0, 128] = 0
│ ├───"dither": enum {off, on} = off
│ ├───"scaling mode": enum {None, Full, Center, Full aspect} = None
│ ├───"audio": enum {off, on, auto} = auto
│ └───"output_csc": enum {bypass, tvrgb, ycbcr601, ycbcr709} = bypass
├───Encoders
│ ├───Encoder 0
│ │ ├───Object ID: 49
│ │ ├───Type: TMDS
│ │ ├───CRTCS: {0, 1, 2, 3}
│ │ └───Clones: {}
│ ├───Encoder 1
│ │ ├───Object ID: 51
│ │ ├───Type: DAC
│ │ ├───CRTCS: {0, 1, 2, 3}
│ │ └───Clones: {}
│ ├───Encoder 2
│ │ ├───Object ID: 52
│ │ ├───Type: DAC
│ │ ├───CRTCS: {0, 1, 2, 3}
│ │ └───Clones: {}
│ └───Encoder 3
│ ├───Object ID: 54
│ ├───Type: TMDS
│ ├───CRTCS: {0, 1, 2, 3}
│ └───Clones: {}
├───CRTCs
│ ├───CRTC 0
│ │ ├───Object ID: 42
│ │ ├───Mode: 1920x1080@60.00 preferred driver phsync pvsync
│ │ ├───Gamma size: 256
│ │ └───Properties
│ ├───CRTC 1
│ │ ├───Object ID: 44
│ │ ├───Gamma size: 256
│ │ └───Properties
│ ├───CRTC 2
│ │ ├───Object ID: 46
│ │ ├───Gamma size: 256
│ │ └───Properties
│ └───CRTC 3
│ ├───Object ID: 48
│ ├───Gamma size: 256
│ └───Properties
└───Planes
├───Plane 0
│ ├───Object ID: 41
│ ├───CRTCs: {0}
│ ├───FB ID: 58
│ │ ├───Object ID: 58
│ │ ├───Size: 1920x1080
│ │ ├───Format: ARGB8888 (0x34325241)
│ │ └───Planes:
│ │ └───Plane 0: offset = 0, pitch = 7680
│ ├───Formats:
│ │ ├───XRGB8888 (0x34325258)
│ │ └───ARGB8888 (0x34325241)
│ └───Properties
│ └───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
├───Plane 1
│ ├───Object ID: 43
│ ├───CRTCs: {1}
│ ├───FB ID: 0
│ ├───Formats:
│ │ ├───XRGB8888 (0x34325258)
│ │ └───ARGB8888 (0x34325241)
│ └───Properties
│ └───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
├───Plane 2
│ ├───Object ID: 45
│ ├───CRTCs: {2}
│ ├───FB ID: 0
│ ├───Formats:
│ │ ├───XRGB8888 (0x34325258)
│ │ └───ARGB8888 (0x34325241)
│ └───Properties
│ └───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
└───Plane 3
├───Object ID: 47
├───CRTCs: {3}
├───FB ID: 0
├───Formats:
│ ├───XRGB8888 (0x34325258)
│ └───ARGB8888 (0x34325241)
└───Properties
That just means your driver doesn't expose this property. drm_info only reports what the driver advertises.
it is not a driver property, it's part of drm_display_info which is itself in turn part of drm_connector
Hi!
How about handling the
drm_panel_orientation_enum_list
to return the panel orientation ? See https://github.com/torvalds/linux/blob/d7227785e384d4422b3ca189aa5bf19f462337cc/drivers/gpu/drm/drm_connector.c#L881-L886