[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 2/2] m68k/atari - atafb: convert allocation of fb ram to new interface



Hi Geert,
        kernel_set_cachemode(screen_base, screen_len,
                                                     IOMAP_WRITETHROUGH);

woops, that won't work with the virt_to_phys() above, nor with transparent
translation. I guess it writes to a non-existent pointer table,
causing the crash?
You mean kernel_set_cachemode wants a physical address?

No, it wants memory mapped using the page tables. Probably it will
work only for System RAM, not for MMIO mapped in head.S.

I've disabled both to check, no change. ST-RAM (4 MB of it) is mapped per page tables in head.S so we should be fine.

The last log line I get is:

atafb_init: start
atafb_init: initializing Falcon hw
atafb: screen_base ff001000 real_screen_base 00001000 screen_len 69632
Determined 640x400, depth 1
  virtual 640x870

which is a bit further down.

I guess it dies in register_framebuffer() - the next log entry is missing:

       fb_info(&fb_info, "frame buffer device, using %dK of video memory\n",
               screen_len >> 10);

And register_framebuffer() will write to the frame buffer, I think.
So info->screen_base may be incorrect.

Yep:

static void atafb_set_disp(struct fb_info *info)
{
        atafb_get_var(&info->var, info);
        atafb_get_fix(&info->fix, info);

        info->screen_base = (void *)info->fix.smem_start;
}

Missing atari_stram_to_virt().

Should have had phys_to_virt() before I guess. Thanks.

Any other casts that indicate bugs? ;-)

Probably - I'll go over the source again. My port of atafb a few years back was none too subtle.

Cheers,

   Michael


Reply to: