mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.5-2023-06-02: amdgpu: - SR-IOV fixes - Warning fixes - Misc code cleanups and spelling fixes - DCN 3.2 updates - Improved DC FAMS support for better power management - Improved DC SubVP support for better power management - DCN 3.1.x fixes - Max IB size query - DC GPU reset fixes - RAS updates - DCN 3.0.x fixes - S/G display fixes - CP shadow buffer support - Implement connector force callback - Z8 power improvements - PSP 13.0.10 vbflash support - Mode2 reset fixes - Store MQDs in VRAM to improve queue switch latency - VCN 3.x fixes - JPEG 3.x fixes - Enable DC_FP on LoongArch - GFXOFF fixes - GC 9.4.3 partition support - SDMA 4.4.2 partition support - VCN/JPEG 4.0.3 partition support - VCN 4.0.3 updates - NBIO 7.9 updates - GC 9.4.3 updates - Take NUMA into account when allocating memory - Handle NUMA for partitions - SMU 13.0.6 updates - GC 9.4.3 RAS updates - Stop including unused swiotlb.h - SMU 13.0.7 fixes - Fix clock output ordering on some APUs - Clean up DC FPGA code - GFX9 preemption fixes - Misc irq fixes - S0ix fixes - Add new DRM_AMDGPU_WERROR config parameter to help with CI - PCIe fix for RDNA2 - kdoc fixes - Documentation updates amdkfd: - Query TTM mem limit rather than hardcoding it - GC 9.4.3 partition support - Handle NUMA for partitions radeon: - Fix possible double free - Stop including unused swiotlb.h - Fix possible division by zero ttm: - Add query for TTM mem limit - Add NUMA awareness to pools - Export ttm_pool_fini() UAPI: - Add new ctx query flag to better handle GPU resets Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290 - Add new interface to query and set shadow buffer for RDNA3 Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21986 - Add new INFO query for max IB size Proposed userspace: https://gitlab.freedesktop.org/bnieuwenhuizen/mesa/-/commits/ib-rejection-v3 amd-drm-next-6.5-2023-06-09: amdgpu: - S0ix fixes - Initial SMU13 Overdrive support - kdoc fixes - Misc clode cleanups - Flexible array fixes - Display OTG fixes - SMU 13.0.6 updates - Revert some broken clock counter updates - Misc display fixes - GFX9 preemption fixes - Add support for newer EEPROM bad page table format - Add missing radeon secondary id - Add support for new colorspace KMS API - CSA fix - Stable pstate fixes for APUs - make vbl interface admin only - Handle PCI accelerator class amdkfd: - Add debugger support for gdb radeon: - Fix possible UAF drm: - Add Colorspace functionality UAPI: - Add debugger interface for enabling gdb Proposed userspace: https://github.com/ROCm-Developer-Tools/ROCdbgapi/tree/wip-dbgapi - Add KMS colorspace API Discussion: https://lists.freedesktop.org/archives/dri-devel/2023-June/408128.html From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230609174817.7764-1-alexander.deucher@amd.com
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <linux/notifier.h>
|
||||
#include <drm/drm_mode_object.h>
|
||||
#include <drm/drm_util.h>
|
||||
#include <drm/drm_property.h>
|
||||
|
||||
#include <uapi/drm/drm_mode.h>
|
||||
|
||||
@@ -424,37 +425,106 @@ enum drm_privacy_screen_status {
|
||||
PRIVACY_SCREEN_ENABLED_LOCKED,
|
||||
};
|
||||
|
||||
/*
|
||||
* This is a consolidated colorimetry list supported by HDMI and
|
||||
/**
|
||||
* enum drm_colorspace - color space
|
||||
*
|
||||
* This enum is a consolidated colorimetry list supported by HDMI and
|
||||
* DP protocol standard. The respective connectors will register
|
||||
* a property with the subset of this list (supported by that
|
||||
* respective protocol). Userspace will set the colorspace through
|
||||
* a colorspace property which will be created and exposed to
|
||||
* userspace.
|
||||
*
|
||||
* DP definitions come from the DP v2.0 spec
|
||||
* HDMI definitions come from the CTA-861-H spec
|
||||
*
|
||||
* A note on YCC and RGB variants:
|
||||
*
|
||||
* Since userspace is not aware of the encoding on the wire
|
||||
* (RGB or YCbCr), drivers are free to pick the appropriate
|
||||
* variant, regardless of what userspace selects. E.g., if
|
||||
* BT2020_RGB is selected by userspace a driver will pick
|
||||
* BT2020_YCC if the encoding on the wire is YUV444 or YUV420.
|
||||
*
|
||||
* @DRM_MODE_COLORIMETRY_DEFAULT:
|
||||
* Driver specific behavior.
|
||||
* @DRM_MODE_COLORIMETRY_NO_DATA:
|
||||
* Driver specific behavior.
|
||||
* @DRM_MODE_COLORIMETRY_SMPTE_170M_YCC:
|
||||
* (HDMI)
|
||||
* SMPTE ST 170M colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_BT709_YCC:
|
||||
* (HDMI, DP)
|
||||
* ITU-R BT.709 colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_XVYCC_601:
|
||||
* (HDMI, DP)
|
||||
* xvYCC601 colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_XVYCC_709:
|
||||
* (HDMI, DP)
|
||||
* xvYCC709 colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_SYCC_601:
|
||||
* (HDMI, DP)
|
||||
* sYCC601 colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_OPYCC_601:
|
||||
* (HDMI, DP)
|
||||
* opYCC601 colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_OPRGB:
|
||||
* (HDMI, DP)
|
||||
* opRGB colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_BT2020_CYCC:
|
||||
* (HDMI, DP)
|
||||
* ITU-R BT.2020 Y'c C'bc C'rc (constant luminance) colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_BT2020_RGB:
|
||||
* (HDMI, DP)
|
||||
* ITU-R BT.2020 R' G' B' colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_BT2020_YCC:
|
||||
* (HDMI, DP)
|
||||
* ITU-R BT.2020 Y' C'b C'r colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65:
|
||||
* (HDMI)
|
||||
* SMPTE ST 2113 P3D65 colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER:
|
||||
* (HDMI)
|
||||
* SMPTE ST 2113 P3DCI colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED:
|
||||
* (DP)
|
||||
* RGB wide gamut fixed point colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT:
|
||||
* (DP)
|
||||
* RGB wide gamut floating point
|
||||
* (scRGB (IEC 61966-2-2)) colorimetry format
|
||||
* @DRM_MODE_COLORIMETRY_BT601_YCC:
|
||||
* (DP)
|
||||
* ITU-R BT.601 colorimetry format
|
||||
* The DP spec does not say whether this is the 525 or the 625
|
||||
* line version.
|
||||
*/
|
||||
|
||||
/* For Default case, driver will set the colorspace */
|
||||
#define DRM_MODE_COLORIMETRY_DEFAULT 0
|
||||
/* CEA 861 Normal Colorimetry options */
|
||||
#define DRM_MODE_COLORIMETRY_NO_DATA 0
|
||||
#define DRM_MODE_COLORIMETRY_SMPTE_170M_YCC 1
|
||||
#define DRM_MODE_COLORIMETRY_BT709_YCC 2
|
||||
/* CEA 861 Extended Colorimetry Options */
|
||||
#define DRM_MODE_COLORIMETRY_XVYCC_601 3
|
||||
#define DRM_MODE_COLORIMETRY_XVYCC_709 4
|
||||
#define DRM_MODE_COLORIMETRY_SYCC_601 5
|
||||
#define DRM_MODE_COLORIMETRY_OPYCC_601 6
|
||||
#define DRM_MODE_COLORIMETRY_OPRGB 7
|
||||
#define DRM_MODE_COLORIMETRY_BT2020_CYCC 8
|
||||
#define DRM_MODE_COLORIMETRY_BT2020_RGB 9
|
||||
#define DRM_MODE_COLORIMETRY_BT2020_YCC 10
|
||||
/* Additional Colorimetry extension added as part of CTA 861.G */
|
||||
#define DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65 11
|
||||
#define DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER 12
|
||||
/* Additional Colorimetry Options added for DP 1.4a VSC Colorimetry Format */
|
||||
#define DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED 13
|
||||
#define DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT 14
|
||||
#define DRM_MODE_COLORIMETRY_BT601_YCC 15
|
||||
enum drm_colorspace {
|
||||
/* For Default case, driver will set the colorspace */
|
||||
DRM_MODE_COLORIMETRY_DEFAULT = 0,
|
||||
/* CEA 861 Normal Colorimetry options */
|
||||
DRM_MODE_COLORIMETRY_NO_DATA = 0,
|
||||
DRM_MODE_COLORIMETRY_SMPTE_170M_YCC = 1,
|
||||
DRM_MODE_COLORIMETRY_BT709_YCC = 2,
|
||||
/* CEA 861 Extended Colorimetry Options */
|
||||
DRM_MODE_COLORIMETRY_XVYCC_601 = 3,
|
||||
DRM_MODE_COLORIMETRY_XVYCC_709 = 4,
|
||||
DRM_MODE_COLORIMETRY_SYCC_601 = 5,
|
||||
DRM_MODE_COLORIMETRY_OPYCC_601 = 6,
|
||||
DRM_MODE_COLORIMETRY_OPRGB = 7,
|
||||
DRM_MODE_COLORIMETRY_BT2020_CYCC = 8,
|
||||
DRM_MODE_COLORIMETRY_BT2020_RGB = 9,
|
||||
DRM_MODE_COLORIMETRY_BT2020_YCC = 10,
|
||||
/* Additional Colorimetry extension added as part of CTA 861.G */
|
||||
DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65 = 11,
|
||||
DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER = 12,
|
||||
/* Additional Colorimetry Options added for DP 1.4a VSC Colorimetry Format */
|
||||
DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED = 13,
|
||||
DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT = 14,
|
||||
DRM_MODE_COLORIMETRY_BT601_YCC = 15,
|
||||
/* not a valid value; merely used for counting */
|
||||
DRM_MODE_COLORIMETRY_COUNT
|
||||
};
|
||||
|
||||
/**
|
||||
* enum drm_bus_flags - bus_flags info for &drm_display_info
|
||||
@@ -914,7 +984,7 @@ struct drm_connector_state {
|
||||
* colorspace change on Sink. This is most commonly used to switch
|
||||
* to wider color gamuts like BT2020.
|
||||
*/
|
||||
u32 colorspace;
|
||||
enum drm_colorspace colorspace;
|
||||
|
||||
/**
|
||||
* @writeback_job: Writeback job for writeback connectors
|
||||
@@ -1938,8 +2008,10 @@ int drm_connector_attach_hdr_output_metadata_property(struct drm_connector *conn
|
||||
bool drm_connector_atomic_hdr_metadata_equal(struct drm_connector_state *old_state,
|
||||
struct drm_connector_state *new_state);
|
||||
int drm_mode_create_aspect_ratio_property(struct drm_device *dev);
|
||||
int drm_mode_create_hdmi_colorspace_property(struct drm_connector *connector);
|
||||
int drm_mode_create_dp_colorspace_property(struct drm_connector *connector);
|
||||
int drm_mode_create_hdmi_colorspace_property(struct drm_connector *connector,
|
||||
u32 supported_colorspaces);
|
||||
int drm_mode_create_dp_colorspace_property(struct drm_connector *connector,
|
||||
u32 supported_colorspaces);
|
||||
int drm_mode_create_content_type_property(struct drm_device *dev);
|
||||
int drm_mode_create_suggested_offset_properties(struct drm_device *dev);
|
||||
|
||||
@@ -2022,6 +2094,7 @@ void drm_connector_list_iter_end(struct drm_connector_list_iter *iter);
|
||||
|
||||
bool drm_connector_has_possible_encoder(struct drm_connector *connector,
|
||||
struct drm_encoder *encoder);
|
||||
const char *drm_get_colorspace_name(enum drm_colorspace colorspace);
|
||||
|
||||
/**
|
||||
* drm_for_each_connector_iter - connector_list iterator macro
|
||||
|
Reference in New Issue
Block a user