On Mon, Feb 21, 2022 at 07:39:14PM -0500, Frank J. Cameron wrote:
> On Sat, Feb 19, 2022 at 05:30:47PM -0500, Frank J. Cameron wrote:
> > On Mon, 3 Aug 2020 02:24:47 +1000 Jonathan Gray <[email protected]> wrote:
> > > On Sun, Aug 02, 2020 at 01:05:37PM +0200, [email protected] wrote:
> > > > System : OpenBSD 6.7
> > > > Installing an OpenBSD snapshot the first time on this iMac Intel
> > > > Core i3 machine. After the radaeon firmware package has been
> > > > installed and you reboot the system, the screen remains black after
> > > > the radeondrm driver initializes.
> > >
> > > Try this. RV730 is DCE3.2
> > > - if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
> > > + if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
> > > + dmi_match(DMI_PRODUCT_NAME, "iMac11,2"))
> >
> > OpenBSD 7.0 on an Intel iMac Core i3 (iMac11,2; RV730) had the same black
> > screen behaviour, but setting enc_idx to 1 did restore a working screen
> > with radeondrm.
> >
> > I haven't extensively tested the system with the patch but DPMS is
> > working and I played some bzflag with high graphics settings; have
> > not seen any regressions yet.
>
> That patch also seems to work well on 7.1 snapshot with the drm 5.15.14:
I don't understand why you see this after the delay.h change
for the same imac model:
sys/dev/pci/drm/include/linux/delay.h
----------------------------
revision 1.3
date: 2020/08/18 19:50:08; author: mglocker; state: Exp; lines: +1 -1;
commitid: 5kwux8n8bT8IM82I;
Our usleep_range(min, max) implementation today is only taking account
of the min value to delay. On the iMac11,2 this was too short, causing
a timeout in the DP AUX transaction retry loop, leaving the eDP dark
after the KMS initialization attempt. Affected code line for reference:
sys/dev/pci/drm/drm_dp_helper.c:771, revision 1.11
Therefore we change the behavior of usleep_range(min, max) to delay
the average value of min and max instead, which finally fixes the KMS
initialization on the iMac11,2.
Help and ok jsg@
----------------------------
>
> Index: sys/dev/pci/drm/radeon/atombios_encoders.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/drm/radeon/atombios_encoders.c,v
> retrieving revision 1.16
> diff -u -p -u -p -r1.16 atombios_encoders.c
> --- sys/dev/pci/drm/radeon/atombios_encoders.c 14 Jan 2022 06:53:14 -0000
> 1.16
> +++ sys/dev/pci/drm/radeon/atombios_encoders.c 22 Feb 2022 00:32:06 -0000
> @@ -2191,7 +2191,8 @@ int radeon_atom_pick_dig_encoder(struct
> * otherwise the internal eDP panel will stay dark.
> */
> if (ASIC_IS_DCE32(rdev)) {
> - if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
> + if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
> + dmi_match(DMI_PRODUCT_NAME, "iMac11,2"))
> enc_idx = (dig->linkb) ? 1 : 0;
> else
> enc_idx = radeon_crtc->crtc_id;
>
>