Loading drivers/video/fbdev/msm/mdss_fb.c +3 −2 Original line number Diff line number Diff line Loading @@ -589,8 +589,8 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev, "primary_panel=%d\nis_pluggable=%d\ndisplay_id=%s\n" "is_cec_supported=%d\nis_pingpong_split=%d\n" "dfps_porch_mode=%d\npu_roi_cnt=%d\ndual_dsi=%d\n" "is_hdr_enabled=%d\n" "peak_brightness=%d\nblackness_level=%d\n" "is_hdr_enabled=%d\npeak_brightness=%d\n" "blackness_level=%d\naverage_brightness=%d\n" "white_chromaticity_x=%d\nwhite_chromaticity_y=%d\n" "red_chromaticity_x=%d\nred_chromaticity_y=%d\n" "green_chromaticity_x=%d\ngreen_chromaticity_y=%d\n" Loading @@ -612,6 +612,7 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev, is_panel_split(mfd), pinfo->hdr_properties.hdr_enabled, pinfo->hdr_properties.peak_brightness, pinfo->hdr_properties.blackness_level, pinfo->hdr_properties.avg_brightness, pinfo->hdr_properties.display_primaries[0], pinfo->hdr_properties.display_primaries[1], pinfo->hdr_properties.display_primaries[2], Loading drivers/video/fbdev/msm/mdss_hdmi_tx.c +26 −0 Original line number Diff line number Diff line Loading @@ -2332,6 +2332,31 @@ static void hdmi_tx_update_deep_color(struct hdmi_tx_ctrl *hdmi_ctrl) } } static void hdmi_tx_update_hdr_info(struct hdmi_tx_ctrl *hdmi_ctrl) { struct mdss_panel_info *pinfo = &hdmi_ctrl->panel_data.panel_info; struct mdss_panel_hdr_properties *hdr_prop = &pinfo->hdr_properties; struct hdmi_edid_hdr_data *hdr_data = NULL; /* CEA-861.3 4.2 */ hdr_prop->hdr_enabled = hdmi_tx_is_hdr_supported(hdmi_ctrl); /* no display primaries in EDID, so skip it */ memset(hdr_prop->display_primaries, 0, sizeof(hdr_prop->display_primaries)); hdmi_edid_get_hdr_data(hdmi_tx_get_fd(HDMI_TX_FEAT_EDID), &hdr_data); if (hdr_prop->hdr_enabled) { hdr_prop->peak_brightness = hdr_data->max_luminance * 10000; if (hdr_data->avg_luminance != 0) hdr_prop->avg_brightness = 50 * (BIT(0) << (int)(hdr_data->avg_luminance / 32)); hdr_prop->blackness_level = (hdr_data->min_luminance * hdr_data->min_luminance * hdr_data->max_luminance * 100) / 65025; } } static void hdmi_tx_hpd_int_work(struct work_struct *work) { struct hdmi_tx_ctrl *hdmi_ctrl = NULL; Loading Loading @@ -2360,6 +2385,7 @@ static void hdmi_tx_hpd_int_work(struct work_struct *work) if (!retry && rc) pr_warn_ratelimited("%s: EDID read failed\n", __func__); hdmi_tx_update_deep_color(hdmi_ctrl); hdmi_tx_update_hdr_info(hdmi_ctrl); hdmi_tx_send_cable_notification(hdmi_ctrl, true); } else { Loading drivers/video/fbdev/msm/mdss_panel.h +2 −0 Original line number Diff line number Diff line Loading @@ -754,6 +754,8 @@ struct mdss_panel_hdr_properties { /* peak brightness supported by panel */ u32 peak_brightness; /* average brightness supported by panel */ u32 avg_brightness; /* Blackness level supported by panel */ u32 blackness_level; }; Loading Loading
drivers/video/fbdev/msm/mdss_fb.c +3 −2 Original line number Diff line number Diff line Loading @@ -589,8 +589,8 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev, "primary_panel=%d\nis_pluggable=%d\ndisplay_id=%s\n" "is_cec_supported=%d\nis_pingpong_split=%d\n" "dfps_porch_mode=%d\npu_roi_cnt=%d\ndual_dsi=%d\n" "is_hdr_enabled=%d\n" "peak_brightness=%d\nblackness_level=%d\n" "is_hdr_enabled=%d\npeak_brightness=%d\n" "blackness_level=%d\naverage_brightness=%d\n" "white_chromaticity_x=%d\nwhite_chromaticity_y=%d\n" "red_chromaticity_x=%d\nred_chromaticity_y=%d\n" "green_chromaticity_x=%d\ngreen_chromaticity_y=%d\n" Loading @@ -612,6 +612,7 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev, is_panel_split(mfd), pinfo->hdr_properties.hdr_enabled, pinfo->hdr_properties.peak_brightness, pinfo->hdr_properties.blackness_level, pinfo->hdr_properties.avg_brightness, pinfo->hdr_properties.display_primaries[0], pinfo->hdr_properties.display_primaries[1], pinfo->hdr_properties.display_primaries[2], Loading
drivers/video/fbdev/msm/mdss_hdmi_tx.c +26 −0 Original line number Diff line number Diff line Loading @@ -2332,6 +2332,31 @@ static void hdmi_tx_update_deep_color(struct hdmi_tx_ctrl *hdmi_ctrl) } } static void hdmi_tx_update_hdr_info(struct hdmi_tx_ctrl *hdmi_ctrl) { struct mdss_panel_info *pinfo = &hdmi_ctrl->panel_data.panel_info; struct mdss_panel_hdr_properties *hdr_prop = &pinfo->hdr_properties; struct hdmi_edid_hdr_data *hdr_data = NULL; /* CEA-861.3 4.2 */ hdr_prop->hdr_enabled = hdmi_tx_is_hdr_supported(hdmi_ctrl); /* no display primaries in EDID, so skip it */ memset(hdr_prop->display_primaries, 0, sizeof(hdr_prop->display_primaries)); hdmi_edid_get_hdr_data(hdmi_tx_get_fd(HDMI_TX_FEAT_EDID), &hdr_data); if (hdr_prop->hdr_enabled) { hdr_prop->peak_brightness = hdr_data->max_luminance * 10000; if (hdr_data->avg_luminance != 0) hdr_prop->avg_brightness = 50 * (BIT(0) << (int)(hdr_data->avg_luminance / 32)); hdr_prop->blackness_level = (hdr_data->min_luminance * hdr_data->min_luminance * hdr_data->max_luminance * 100) / 65025; } } static void hdmi_tx_hpd_int_work(struct work_struct *work) { struct hdmi_tx_ctrl *hdmi_ctrl = NULL; Loading Loading @@ -2360,6 +2385,7 @@ static void hdmi_tx_hpd_int_work(struct work_struct *work) if (!retry && rc) pr_warn_ratelimited("%s: EDID read failed\n", __func__); hdmi_tx_update_deep_color(hdmi_ctrl); hdmi_tx_update_hdr_info(hdmi_ctrl); hdmi_tx_send_cable_notification(hdmi_ctrl, true); } else { Loading
drivers/video/fbdev/msm/mdss_panel.h +2 −0 Original line number Diff line number Diff line Loading @@ -754,6 +754,8 @@ struct mdss_panel_hdr_properties { /* peak brightness supported by panel */ u32 peak_brightness; /* average brightness supported by panel */ u32 avg_brightness; /* Blackness level supported by panel */ u32 blackness_level; }; Loading