Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tegra: sor: Filter eDP rates

The SOR found on Tegra SoCs does not support all the rates potentially
advertised by eDP 1.4. Make sure that the rates that are not supported
are filtered out.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+26
+26
drivers/gpu/drm/tegra/sor.c
··· 605 605 return clk; 606 606 } 607 607 608 + static void tegra_sor_filter_rates(struct tegra_sor *sor) 609 + { 610 + struct drm_dp_link *link = &sor->link; 611 + unsigned int i; 612 + 613 + /* Tegra only supports RBR, HBR and HBR2 */ 614 + for (i = 0; i < link->num_rates; i++) { 615 + switch (link->rates[i]) { 616 + case 1620000: 617 + case 2700000: 618 + case 5400000: 619 + break; 620 + 621 + default: 622 + DRM_DEBUG_KMS("link rate %lu kHz not supported\n", 623 + link->rates[i]); 624 + link->rates[i] = 0; 625 + break; 626 + } 627 + } 628 + 629 + drm_dp_link_update_rates(link); 630 + } 631 + 608 632 static int tegra_sor_power_up_lanes(struct tegra_sor *sor, unsigned int lanes) 609 633 { 610 634 unsigned long timeout; ··· 1920 1896 err = drm_dp_link_probe(sor->aux, &sor->link); 1921 1897 if (err < 0) 1922 1898 dev_err(sor->dev, "failed to probe eDP link: %d\n", err); 1899 + 1900 + tegra_sor_filter_rates(sor); 1923 1901 1924 1902 err = drm_dp_link_choose(&sor->link, mode, info); 1925 1903 if (err < 0)