radeondrm

make radeondrm(1) work with iMac 11,1
Log | Files | Refs | README

imac_radeondrm_atombios_encoders.diff (1874B)


      1 Index: radeon/atombios_encoders.c
      2 ===================================================================
      3 RCS file: /cvs/src/sys/dev/pci/drm/radeon/atombios_encoders.c,v
      4 retrieving revision 1.17
      5 diff -u -p -r1.17 atombios_encoders.c
      6 --- radeon/atombios_encoders.c	24 Feb 2022 12:49:47 -0000	1.17
      7 +++ radeon/atombios_encoders.c	23 Apr 2022 18:13:00 -0000
      8 @@ -2187,12 +2187,13 @@ int radeon_atom_pick_dig_encoder(struct 
      9  	}
     10  
     11  	/*
     12 -	 * On DCE32 any encoder can drive any block so usually just use crtc id,
     13 -	 * but Apple thinks different at least on iMac10,1, so there use linkb,
     14 -	 * otherwise the internal eDP panel will stay dark.
     15 +	 * On DCE31 any encoder can drive any block so usually just use crtc id,
     16 +	 * but Apple thinks different at least on iMac10,1 and iMac11,1, so
     17 +	 * there use linkb, otherwise the internal eDP panel will stay dark.
     18  	 */
     19 -	if (ASIC_IS_DCE32(rdev)) {
     20 -		if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
     21 +	if (ASIC_IS_DCE31(rdev)) {
     22 +		if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
     23 +		    dmi_match(DMI_PRODUCT_NAME, "iMac11,1"))
     24  			enc_idx = (dig->linkb) ? 1 : 0;
     25  		else
     26  			enc_idx = radeon_crtc->crtc_id;
     27 Index: radeon/radeon.h
     28 ===================================================================
     29 RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon.h,v
     30 retrieving revision 1.27
     31 diff -u -p -r1.27 radeon.h
     32 --- radeon/radeon.h	14 Jan 2022 06:53:15 -0000	1.27
     33 +++ radeon/radeon.h	23 Apr 2022 18:13:00 -0000
     34 @@ -2711,6 +2711,7 @@ void r100_pll_errata_after_index(struct 
     35  			    (rdev->family == CHIP_RS740)  ||	\
     36  			    (rdev->family >= CHIP_R600))
     37  #define ASIC_IS_DCE3(rdev) ((rdev->family >= CHIP_RV620))
     38 +#define ASIC_IS_DCE31(rdev) ((rdev->family >= CHIP_RV770))
     39  #define ASIC_IS_DCE32(rdev) ((rdev->family >= CHIP_RV730))
     40  #define ASIC_IS_DCE4(rdev) ((rdev->family >= CHIP_CEDAR))
     41  #define ASIC_IS_DCE41(rdev) ((rdev->family >= CHIP_PALM) && \