Lines Matching full:vic

1556  * HDMI 1.4 4k modes. Index using the VIC.
4215 static __always_inline const struct drm_display_mode *cea_mode_for_vic(u8 vic) in cea_mode_for_vic() argument
4220 if (vic >= 1 && vic < 1 + ARRAY_SIZE(edid_cea_modes_1)) in cea_mode_for_vic()
4221 return &edid_cea_modes_1[vic - 1]; in cea_mode_for_vic()
4222 if (vic >= 193 && vic < 193 + ARRAY_SIZE(edid_cea_modes_193)) in cea_mode_for_vic()
4223 return &edid_cea_modes_193[vic - 193]; in cea_mode_for_vic()
4232 static u8 cea_next_vic(u8 vic) in cea_next_vic() argument
4234 if (++vic == 1 + ARRAY_SIZE(edid_cea_modes_1)) in cea_next_vic()
4235 vic = 193; in cea_next_vic()
4236 return vic; in cea_next_vic()
4265 cea_mode_alternate_timings(u8 vic, struct drm_display_mode *mode) in cea_mode_alternate_timings() argument
4285 if (((vic == 8 || vic == 9 || in cea_mode_alternate_timings()
4286 vic == 12 || vic == 13) && mode->vtotal < 263) || in cea_mode_alternate_timings()
4287 ((vic == 23 || vic == 24 || in cea_mode_alternate_timings()
4288 vic == 27 || vic == 28) && mode->vtotal < 314)) { in cea_mode_alternate_timings()
4303 u8 vic; in drm_match_cea_mode_clock_tolerance() local
4311 for (vic = 1; vic < cea_num_vics(); vic = cea_next_vic(vic)) { in drm_match_cea_mode_clock_tolerance()
4315 drm_mode_init(&cea_mode, cea_mode_for_vic(vic)); in drm_match_cea_mode_clock_tolerance()
4327 return vic; in drm_match_cea_mode_clock_tolerance()
4328 } while (cea_mode_alternate_timings(vic, &cea_mode)); in drm_match_cea_mode_clock_tolerance()
4338 * Return: The CEA Video ID (VIC) of the mode or 0 if it isn't a CEA-861
4344 u8 vic; in drm_match_cea_mode() local
4352 for (vic = 1; vic < cea_num_vics(); vic = cea_next_vic(vic)) { in drm_match_cea_mode()
4356 drm_mode_init(&cea_mode, cea_mode_for_vic(vic)); in drm_match_cea_mode()
4368 return vic; in drm_match_cea_mode()
4369 } while (cea_mode_alternate_timings(vic, &cea_mode)); in drm_match_cea_mode()
4376 static bool drm_valid_cea_vic(u8 vic) in drm_valid_cea_vic() argument
4378 return cea_mode_for_vic(vic) != NULL; in drm_valid_cea_vic()
4410 u8 vic; in drm_match_hdmi_mode_clock_tolerance() local
4418 for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) { in drm_match_hdmi_mode_clock_tolerance()
4419 const struct drm_display_mode *hdmi_mode = &edid_4k_modes[vic]; in drm_match_hdmi_mode_clock_tolerance()
4431 return vic; in drm_match_hdmi_mode_clock_tolerance()
4443 * Returns the HDMI Video ID (VIC) of the mode or 0 if it isn't one.
4448 u8 vic; in drm_match_hdmi_mode() local
4456 for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) { in drm_match_hdmi_mode()
4457 const struct drm_display_mode *hdmi_mode = &edid_4k_modes[vic]; in drm_match_hdmi_mode()
4467 return vic; in drm_match_hdmi_mode()
4472 static bool drm_valid_hdmi_vic(u8 vic) in drm_valid_hdmi_vic() argument
4474 return vic > 0 && vic < ARRAY_SIZE(edid_4k_modes); in drm_valid_hdmi_vic()
4496 u8 vic = drm_match_cea_mode(mode); in add_alternate_cea_modes() local
4499 if (drm_valid_cea_vic(vic)) { in add_alternate_cea_modes()
4500 cea_mode = cea_mode_for_vic(vic); in add_alternate_cea_modes()
4503 vic = drm_match_hdmi_mode(mode); in add_alternate_cea_modes()
4504 if (drm_valid_hdmi_vic(vic)) { in add_alternate_cea_modes()
4505 cea_mode = &edid_4k_modes[vic]; in add_alternate_cea_modes()
4551 /* 0-6 bit vic, 7th bit native mode indicator */ in svd_to_vic()
4559 * Return a display mode for the 0-based vic_index'th VIC across all CTA VDBs in
4591 u8 vic = svd_to_vic(svds[i]); in do_y420vdb_modes() local
4594 if (!drm_valid_cea_vic(vic)) in do_y420vdb_modes()
4597 newmode = drm_mode_duplicate(dev, cea_mode_for_vic(vic)); in do_y420vdb_modes()
4608 * drm_display_mode_from_cea_vic() - return a mode for CEA VIC
4610 * @video_code: CEA VIC of the mode
4612 * Creates a new mode matching the specified CEA VIC.
4721 static int add_hdmi_mode(struct drm_connector *connector, u8 vic) in add_hdmi_mode() argument
4726 if (!drm_valid_hdmi_vic(vic)) { in add_hdmi_mode()
4727 drm_err(connector->dev, "[CONNECTOR:%d:%s] Unknown HDMI VIC: %d\n", in add_hdmi_mode()
4728 connector->base.id, connector->name, vic); in add_hdmi_mode()
4732 newmode = drm_mode_duplicate(dev, &edid_4k_modes[vic]); in add_hdmi_mode()
4840 u8 vic; in do_hdmi_vsdb_modes() local
4842 vic = db[9 + offset + i]; in do_hdmi_vsdb_modes()
4843 modes += add_hdmi_mode(connector, vic); in do_hdmi_vsdb_modes()
5333 u8 vic; in fixup_detailed_cea_mode_clock() local
5340 vic = drm_match_cea_mode_clock_tolerance(mode, 5); in fixup_detailed_cea_mode_clock()
5341 if (drm_valid_cea_vic(vic)) { in fixup_detailed_cea_mode_clock()
5343 cea_mode = cea_mode_for_vic(vic); in fixup_detailed_cea_mode_clock()
5347 vic = drm_match_hdmi_mode_clock_tolerance(mode, 5); in fixup_detailed_cea_mode_clock()
5348 if (drm_valid_hdmi_vic(vic)) { in fixup_detailed_cea_mode_clock()
5350 cea_mode = &edid_4k_modes[vic]; in fixup_detailed_cea_mode_clock()
5368 "[CONNECTOR:%d:%s] detailed mode matches %s VIC %d, adjusting clock %d -> %d\n", in fixup_detailed_cea_mode_clock()
5370 type, vic, mode->clock, clock); in fixup_detailed_cea_mode_clock()
5975 /* All CEA modes other than VIC 1 use limited quantization range. */ in drm_default_rgb_quant_range()
6003 u8 vic = svd_to_vic(svds[i]); in parse_cta_vdb() local
6005 if (!drm_valid_cea_vic(vic)) in parse_cta_vdb()
6006 vic = 0; in parse_cta_vdb()
6008 info->vics[vic_index++] = vic; in parse_cta_vdb()
6015 * Translate the y420cmdb_map based on VIC indexes to y420_cmdb_modes indexed
6025 u8 vic = info->vics[i]; in update_cta_y420cmdb() local
6027 if (vic && y420cmdb_map & BIT_ULL(i)) in update_cta_y420cmdb()
6028 bitmap_set(hdmi->y420_cmdb_modes, vic, 1); in update_cta_y420cmdb()
6032 static bool cta_vdb_has_vic(const struct drm_connector *connector, u8 vic) in cta_vdb_has_vic() argument
6037 if (!vic || !info->vics) in cta_vdb_has_vic()
6041 if (info->vics[i] == vic) in cta_vdb_has_vic()
6058 u8 vic = svd_to_vic(svds[i]); in parse_cta_y420vdb() local
6060 if (!drm_valid_cea_vic(vic)) in parse_cta_y420vdb()
6063 bitmap_set(hdmi->y420_vdb_modes, vic, 1); in parse_cta_y420vdb()
7155 /* No HDMI VIC when signalling 3D video format */ in drm_mode_hdmi_vic()
7167 * we should send its VIC in vendor infoframes, else send the in drm_mode_cea_vic()
7168 * VIC in AVI infoframes. Lets check if this mode is present in in drm_mode_cea_vic()
7181 * HDMI 1.4 (CTA-861-D) VIC range: [1..64]
7182 * HDMI 2.0 (CTA-861-F) VIC range: [1..107]
7184 * If the sink lists the VIC in CTA VDB, assume it's fine, regardless of HDMI
7187 static u8 vic_for_avi_infoframe(const struct drm_connector *connector, u8 vic) in vic_for_avi_infoframe() argument
7189 if (!is_hdmi2_sink(connector) && vic > 64 && in vic_for_avi_infoframe()
7190 !cta_vdb_has_vic(connector, vic)) in vic_for_avi_infoframe()
7193 return vic; in vic_for_avi_infoframe()
7211 u8 vic, hdmi_vic; in drm_hdmi_avi_infoframe_from_display_mode() local
7221 vic = drm_mode_cea_vic(connector, mode); in drm_hdmi_avi_infoframe_from_display_mode()
7240 if (vic) in drm_hdmi_avi_infoframe_from_display_mode()
7241 picture_aspect = drm_get_cea_aspect_ratio(vic); in drm_hdmi_avi_infoframe_from_display_mode()
7249 * we can only satisfy it by specifying the right VIC. in drm_hdmi_avi_infoframe_from_display_mode()
7252 if (vic) { in drm_hdmi_avi_infoframe_from_display_mode()
7253 if (picture_aspect != drm_get_cea_aspect_ratio(vic)) in drm_hdmi_avi_infoframe_from_display_mode()
7265 frame->video_code = vic_for_avi_infoframe(connector, vic); in drm_hdmi_avi_infoframe_from_display_mode()
7394 * (ie.vic==0 and s3d_struct==0) we will still send it if we in drm_hdmi_vendor_infoframe_from_display_mode()
7401 frame->vic = drm_mode_hdmi_vic(connector, mode); in drm_hdmi_vendor_infoframe_from_display_mode()