[PATCH/RFC 0/3] Atari DRM driver
Eero Tamminen
oak at helsinkinet.fi
Wed May 21 22:56:38 UTC 2025
Hi Geert,
On 21.5.2025 10.06, Geert Uytterhoeven wrote:
> On Wed, 21 May 2025 at 01:59, Eero Tamminen <oak at helsinkinet.fi> wrote:
>> I tried your "atari-drm-wip-v1" branch commits on top of 6.14.
>
> Thanks for testing!
>
>> After some minor changes those applied. Getting it to build required
>> adding "&shadow_plane_state->fmtcnv_state" (struct drm_format_conv_state
>> *) argument to *_blit() functions in atari_drm.c, and changing:
>> drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
>> in its probe function to:
>> struct drm_format_info *format = NULL;
>> drm_client_setup(dev, format);
>
> I do keep it up-to-date locally, so I could provide these changes,
> if you are interested.
Yes, please! (see below)
>> However, the result is not working very well yet.
>>
>> Driver gets initialized fine under Hatari TT emulation:
>> -------------------------
>> atafb atafb: phys_screen_base 511000 screen_len 311296
>> atafb atafb: Determined 1280x960, depth 1
>> atafb atafb: virtual 1280x1945
>> Console: switching to mono frame buffer device 160x60
>> fb0: frame buffer device, using 304K of video memory
>> ...
>> atari_drm atari_drm: phys_screen_base 55d000 screen_len 311296
>> atari_drm atari_drm: Determined 1280x960, depth 1
>> atari_drm atari_drm: virtual 1280x1945
>> [drm] Initialized atari_drm 1.0.0 for atari_drm on minor 0
>> atari_drm atari_drm: Atari DRM, using 304K of video memory
>> -------------------------
>>
>> However, once screen switches from "atafb" to "atari_drm" driver, Linux
>> boot logo & texts disappear, and (emulated) screen is either all white
>> (on mono monitor) or all black (on VGA & RGGB monitors).
>
> So you have both atafb and atari_drm enabled? Please don't do that.
Disabling CONFIG_FB_ATARI option (but still keeping rest of FB options),
worked worse:
-------------------------
atari_drm atari_drm: phys_screen_base 512000 screen_len 311296
atari_drm atari_drm: Determined 640x480, depth 4
atari_drm atari_drm: virtual 640x972
[drm] Initialized atari_drm 1.0.0 for atari_drm on minor 0
atari_drm atari_drm: Atari DRM, using 304K of video memory
Data write fault at 0x00000020 in Super Data (pc=0x3115f6)
BAD KERNEL BUSERR
Oops: 00000000
PC: [<003115f6>] strcpy+0x16/0x22
SR: 2200 SP: (ptrval) a2: 01026000
d0: 00000000 d1: 0000015b d2: 0114e000 d3: 00319f2a
d4: 01181118 d5: 00000001 a0: 00000020 a1: 003e1cbf
Process swapper (pid: 1, task=(ptrval))
Frame format=A ssw=0315 isc=66f2 isb=2008 daddr=00000020 dobuf=0000005b
Stack from 01029c24:
...
Call Trace:
[<001e6bc8>] __drm_fb_helper_initial_config_and_unlock+0x3a6/0x46c
[<001e6cb0>] drm_fb_helper_initial_config+0x22/0x30
[<001e85a0>] drm_fbdev_client_hotplug+0x6e/0x9c
[<001d6efc>] drm_client_register+0x62/0x9e
[<001e8714>] drm_fbdev_client_setup+0x146/0x14e
[<00311650>] strcmp+0x0/0x34
[<001e7bb6>] drm_client_setup+0x32/0xaa
[<00007336>] _dev_info+0x0/0x34
[<0044b472>] atari_drm_probe+0xd58/0xe32
...
-------------------------
=> due to me using NULL as drm_client_setup() "drm_format_info"?
>> And while "atafb" works fine also under Falcon emulation with RGB (50Hz)
>> or VGA (60Hz) monitor, "atari_drm" probing fails:
>> -------------------------
>> genirq: Flags mismatch irq 4. 00200000 (framebuffer:modeswitch) vs.
>> 00200000 (framebuffer:modeswitch)
>
> That's also a sign of two drivers requesting the same IRQ unexpectedly.
>
>> atari_drm atari_drm: probe with driver atari_drm failed with error -16
>
> i.e. -EBUSY.
Ok, makes sense.
- Eero
More information about the dri-devel
mailing list