Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bf5a81b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: Add and handle new aspect ratios in DRM layer"

parents c72ffa81 0d6471ef
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1455,6 +1455,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
	case HDMI_PICTURE_ASPECT_16_9:
		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
		break;
	case HDMI_PICTURE_ASPECT_64_27:
		out->flags |= DRM_MODE_FLAG_PIC_AR_64_27;
		break;
	case DRM_MODE_PICTURE_ASPECT_256_135:
		out->flags |= DRM_MODE_FLAG_PIC_AR_256_135;
		break;
	case HDMI_PICTURE_ASPECT_RESERVED:
	default:
		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
@@ -1516,6 +1522,12 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
	case DRM_MODE_FLAG_PIC_AR_16_9:
		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
		break;
	case DRM_MODE_FLAG_PIC_AR_64_27:
		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
		break;
	case DRM_MODE_FLAG_PIC_AR_256_135:
		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
		break;
	default:
		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
		break;
+6 −0
Original line number Diff line number Diff line
@@ -84,6 +84,8 @@ extern "C" {
#define DRM_MODE_PICTURE_ASPECT_NONE		0
#define DRM_MODE_PICTURE_ASPECT_4_3		1
#define DRM_MODE_PICTURE_ASPECT_16_9		2
#define DRM_MODE_PICTURE_ASPECT_64_27		3
#define DRM_MODE_PICTURE_ASPECT_256_135		4

/* Aspect ratio flag bitmask (4 bits 27:24) */
#define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<24)
@@ -93,6 +95,10 @@ extern "C" {
			(DRM_MODE_PICTURE_ASPECT_4_3<<24)
#define  DRM_MODE_FLAG_PIC_AR_16_9 \
			(DRM_MODE_PICTURE_ASPECT_16_9<<24)
#define  DRM_MODE_FLAG_PIC_AR_64_27 \
			(DRM_MODE_PICTURE_ASPECT_64_27<<24)
#define  DRM_MODE_FLAG_PIC_AR_256_135 \
			(DRM_MODE_PICTURE_ASPECT_256_135<<24)

/* DPMS flags */
/* bit compatible with the xorg definitions. */