Closed MerlijnWajer closed 2 years ago
I rebuilt the package with -ggdb and now the debug symbols are usable, the problem is that the page_flip->bufs[i].pixmap
is NULL in update_flip_pixmaps
.
I believe this is the case because PVR2D_PreFBReset
calls pvr2d_page_flip_destroy
which just memset()
s the page flip to 0
, thereby removing the reference to the pixmap (which only gets created in PVR2DCreateScreenResources
using sgx_exa_create_pixmap
).
PVR2D_PostFBReset
attempts to restore the page flip using pvr2d_set_frame_buffer
which calls pvr2d_page_flip_create
, but this function critically does not (re) create any pixmaps.
So I think a potential solution could be to call PVR2DCreateScreenResources(scrn_info->pScreen)
in PVR2D_PostFBReset
before calling update_flip_pixmaps
.
So the above fixes the segfault, but then xrandr reports:
# xrandr -o right
Failed to change the screen configuration!
And the screen turns black.
I suppose one of the problems is that the memset I discussed above actually overwrites pixmap pointers that it should not override (or if it does, at least it should free them)
It looks like something fails:
[ 162.628] (WW) PVRSGX(0): omap/sysfs: can't write to '/sys/devices/platform/omapdss/display0/enabled': 22:Invalid argument
[ 162.631] (EE) PVRSGX(0): Unable to enable output
-22 is invalid argument, so perhaps it's trying to write an invalid value, but that might just be a red herring.
I think that perhaps after post_fb_reset
in fbdev.c
the GetScreenPixmap
call fails because of the pixmap overriding as I mentioned before. Requires more stepping with gdb.
In addition to fixing this problem, I should also test it with tv output.
Looks like this is the next cause of failure:
[ 267.926] omap_fb_alloc: ioctl(OMAPFB_SETUP_MEM) failed 12:Cannot allocate memory
[ 267.930] omap_fb_alloc: failed omapfb_mem_info
size 976158720
type 0
That size seems kind of large.
Also, unrelated, but we probably want to fix this for the N900 resolution:
/* SGX has a 2048x2048 maximum texture size limit */
/* FIXME should be limited further based on the amount of vram */
xf86CrtcSetSizeRange(pScrn, 1, 1, 2048, 2048);
Upon re-run the ioctl memory error did not occur, so perhaps that's related to something else, still, the code seems a little off.
It looks like the enabled
write fails because of this (the write returns EINVAL even though the value is '1' which is correct, but it doesn't seem to like to underlying state):
[ 852.551239] omapdss OVERLAY error: overlay 0 vertically not inside the display area (0 + 800 >= 480)
[ 852.551269] omapdss APPLY error: failed to enable manager 0: check_settings failed
[ 852.551391] acx565akm_panel_power_on sdi enable failed
This is now fixed by @freemangordon with the new omap ddx + kernel
As a clarification, rotation doesn't -work- yet, but it doesn't segfault.
Rotating the screen, e.g. with
xrandr -o right
Crashes the X in
sgx_exa_update_pixmap
in https://github.com/maemo-leste/xf86-video-pvrsgx/Oddly enough there is no debug symbols available at all inside the sgx code: