drm: add connector id in DRM_IOCTL_MESON_TESTATTR ioctl [1/1]

PD#SWPL-218705

Problem:
DRM_IOCTL_MESON_TESTATTR ioctl has no connector id

Solution:
add connector id in DRM_IOCTL_MESON_TESTATTR ioctl

Verify:
s7d

Test:
DRM-OSD-5

Change-Id: If179dd0a252e2ad1578bef46b156916cd5522a4f
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
This commit is contained in:
Ao Xu
2025-06-17 19:32:34 +08:00
committed by gerrit autosubmit
parent 03637d6adf
commit 9da8ecfc07
2 changed files with 7 additions and 4 deletions
+6 -4
View File
@@ -40,7 +40,6 @@
#define HDMITX_ATTR_LEN_MAX 16
#define HDMITX_MAX_BPC 12
static struct drm_connector *tx_conn;
/* confirm whether the current mode is integer mode or frac mode */
static bool meson_hdmitx_is_alter_mode(struct drm_display_mode *mode);
@@ -2638,8 +2637,6 @@ int meson_hdmitx_dev_bind(struct drm_device *drm,
encoder = &am_hdmi->encoder;
connector = &am_hdmi->base.connector;
intf->conn = connector;
//TODO hwc&weston should pass conn id
tx_conn = connector;
am_hdmi->hdmi_type = type;
switch (type) {
@@ -2803,8 +2800,13 @@ int am_meson_mode_testattr_ioctl(struct drm_device *dev,
enum hdmi_color_depth cd;
enum hdmi_quantization_range cr;
struct drm_mode_test_attr *f = data;
struct drm_mode_object *mo;
connector = tx_conn;
mo = drm_mode_object_find(dev, file_priv, f->conn_id, DRM_MODE_OBJECT_CONNECTOR);
if (!mo)
return -EINVAL;
connector = obj_to_connector(mo);
tx_comm = meson_get_hdmitx_common(connector);
hdmitx_parse_color_attr(f->attr, &cs, &cd, &cr);
+1
View File
@@ -59,6 +59,7 @@ struct drm_mode_test_attr {
char modename[DRM_DISPLAY_MODE_LEN];
char attr[DRM_DISPLAY_MODE_LEN];
__u32 valid;
__u32 conn_id;
};
struct drm_meson_fbdev_rect {