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

drm/nv04/disp: handle dual-link spwg panels without needing quirks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

+8 -15
-12
drivers/gpu/drm/nouveau/nouveau_bios.c
··· 4304 4304 break; 4305 4305 } 4306 4306 4307 - /* Dell Latitude D620 reports a too-high value for the dual-link 4308 - * transition freq, causing us to program the panel incorrectly. 4309 - * 4310 - * It doesn't appear the VBIOS actually uses its transition freq 4311 - * (90000kHz), instead it uses the "Number of LVDS channels" field 4312 - * out of the panel ID structure (http://www.spwg.org/). 4313 - * 4314 - * For the moment, a quirk will do :) 4315 - */ 4316 - if (nv_match_device(dev, 0x01d7, 0x1028, 0x01c2)) 4317 - bios->fp.duallink_transition_clk = 80000; 4318 - 4319 4307 /* set dual_link flag for EDID case */ 4320 4308 if (pxclk && (chip_version < 0x25 || chip_version > 0x28)) 4321 4309 bios->fp.dual_link = (pxclk >= bios->fp.duallink_transition_clk);
+8 -3
drivers/gpu/drm/nouveau/nv04_dfp.c
··· 341 341 output_mode->clock > 165000) 342 342 regp->fp_control |= (2 << 24); 343 343 if (nv_encoder->dcb->type == OUTPUT_LVDS) { 344 - bool duallink, dummy; 344 + bool duallink = false, dummy; 345 + if (nv_connector->edid && 346 + nv_connector->type == DCB_CONNECTOR_LVDS_SPWG) { 347 + duallink = (((u8 *)nv_connector->edid)[121] == 2); 348 + } else { 349 + nouveau_bios_parse_lvds_table(dev, output_mode->clock, 350 + &duallink, &dummy); 351 + } 345 352 346 - nouveau_bios_parse_lvds_table(dev, output_mode->clock, 347 - &duallink, &dummy); 348 353 if (duallink) 349 354 regp->fp_control |= (8 << 28); 350 355 } else