On Thu, Oct 19, 2023 at 11:00:42AM +1100, Jonathan Gray wrote:
> On Wed, Oct 18, 2023 at 08:31:41PM +0200, Marcus Glocker wrote:
> > When I revert this commit, the screen on my iMac11,2 works again:
> >
> > https://marc.info/?l=openbsd-cvs&m=167989100718759&w=2
>
> Are there multiple models of iMac11,2 or is this due to something
> not acting as linux does?
I don't know, but I doubt that there are multiple iMac11,2 models.
It looks more like a tweak in our radeondrm implementation. I just
installed Debian 12 on that iMac11,2, and graphic is just working fine.
[ 2.373067] [drm] radeon kernel modesetting enabled.
[ 2.373639] [drm] initializing kernel modesetting (RV730 0x1002:0x9488
0x106B:0x00B6 0x00).
[ 2.658184] [drm] Detected VRAM RAM=256M, BAR=256M
[ 2.658185] [drm] RAM width 128bits DDR
[ 2.658210] [drm] radeon: 256M of VRAM memory ready
[ 2.658211] [drm] radeon: 1024M of GTT memory ready.
[ 2.658218] [drm] Loading RV730 Microcode
[ 2.658353] [drm] External GPIO thermal controller with fan control
[ 2.661588] [drm] radeon: dpm initialized
> I'm not opposed to reverting it and having a local diff, but would
> prefer not to.
I understand. I guess it will be difficult to find out what we do
different in radeondrm which leads to that this commit breaks it on
OpenBSD/iMac11,2.
> > Index: atombios_encoders.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/pci/drm/radeon/atombios_encoders.c,v
> > retrieving revision 1.19
> > diff -u -p -u -p -r1.19 atombios_encoders.c
> > --- atombios_encoders.c 27 Mar 2023 04:23:40 -0000 1.19
> > +++ atombios_encoders.c 18 Oct 2023 18:29:56 -0000
> > @@ -2122,12 +2122,11 @@ int radeon_atom_pick_dig_encoder(struct
> >
> > /*
> > * On DCE32 any encoder can drive any block so usually just use crtc id,
> > - * but Apple thinks different at least on iMac10,1 and iMac11,2, so
> > there use linkb,
> > + * but Apple thinks different at least on iMac10,1, so there use linkb,
> > * otherwise the internal eDP panel will stay dark.
> > */
> > if (ASIC_IS_DCE32(rdev)) {
> > - if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
> > - dmi_match(DMI_PRODUCT_NAME, "iMac11,2"))
> > + if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
> > enc_idx = (dig->linkb) ? 1 : 0;
> > else
> > enc_idx = radeon_crtc->crtc_id;
> >