git clone https://github.com/libsdl-org/SDL-1.2.git
cd SDL-1.2
CFLAGS="-O3 -pipe -march=armv7ve -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4 -fPIC" ./configure --disable-video-x11-vm --enable-video-x11-xrandr --enable-arm-neon --prefix=/usr
make
sudo make install
const struct Scalers scalers[] =
{
{ 3 * vga_width, 3 * vga_height, NULL, scale3x_16, scale3x_32, "Scale3x" }
};
# FLAGS ####################################################
ifneq ($(MAKECMDGOALS), release)
EXTRA_CFLAGS += -g3 -O0 -pipe -march=armv7ve -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4 -fPIC
else
EXTRA_CFLAGS += -g0 -O2 -DNDEBUG
endif
EXTRA_CFLAGS += -I/usr/include/SDL -MMD -pedantic -Wall -Wextra -Wno-missing-field-initializers
Maybe @aTc maybe able to help there, he maintains the pyra specific repo anyway so he can make it the default somehow.Sooo... packaging? I know how to do the dbp but any tips on libSDL deb?
Do you mean like from the NEON scalers thread and from GitHub - M-HT/neon_scalers ?Could we possibly use neon scalers like we did on the Pandora at some point?
extern void neon_scale3x_16_16( SDL_Surface *src_surface, SDL_Surface *dst_surface );
extern void neon_scale3x_32_32( SDL_Surface *src_surface, SDL_Surface *dst_surface );
const struct Scalers scalers[] =
{
{ 3 * vga_width, 3 * vga_height, NULL, neon_scale3x_16_16, neon_scale3x_32_32, "Scale3x" }
}
Comment 3 by daveshah, Jun 18, 2020
The TILER is now working again in 5.6. A new command line parameter
is added "drm.force_hw_rotation" that uses the panel
orientation to rotate the framebuffer using the TILER.
The situation is still not ideal, primarily as userspace stuff still
needs some changes to use TILER correctly. In particular,
width/height still need to be swapped, and anything using
DRM_IOCTL_MODE_CREATE_DUMB needs to be changed to
DRM_IOCTL_OMAP_GEM_NEW in order to create a tiled buffer.
However, I have implemented a shim to fix this for fullscreen stuff (
https://github.com/daveshah1/tiler_rotate_shim) and am currently
patching the xf86-video-armsoc-omap5 X11 driver to use TILER
rotation too, in order to get DRI3 support.
git clone https://github.com/libsdl-org/SDL-1.2.git
cd SDL-1.2
CFLAGS="-O3 -pipe -march=armv7ve -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4 -fPIC" ./configure --disable-video-x11-vm --enable-video-x11-xrandr --enable-arm-neon --prefix=/usr
make
sudo make install
static void get_real_resolution(_THIS, int* w, int* h)
{
...
#if SDL_VIDEO_DRIVER_X11_VIDMODE
if ( use_vidmode ) {
SDL_NAME(XF86VidModeModeLine) mode;
int unused;
if ( SDL_NAME(XF86VidModeGetModeLine)(SDL_Display, SDL_Screen, &unused, &mode) ) {
/* Needed swapping for pyra rotation */
*h = mode.hdisplay;
*w = mode.vdisplay;
return;
}
}
#endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
#if SDL_VIDEO_DRIVER_X11_XRANDR
if ( use_xrandr ) {
int nsizes;
XRRScreenSize* sizes;
sizes = XRRConfigSizes(screen_config, &nsizes);
if ( nsizes > 0 ) {
int cur_size;
Rotation cur_rotation;
cur_size = XRRConfigCurrentConfiguration(screen_config, &cur_rotation);
if ( cur_size >= 0 && cur_size < nsizes ) {
*w = sizes[cur_size].width;
*h = sizes[cur_size].height;
}
#ifdef X11MODES_DEBUG
fprintf(stderr, "XRANDR: get_real_resolution: w = %d h = %d\n", *w, *h);
#endif
return;
}
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
...
}
me@pyra:~$ xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 720, maximum 8192 x 8192
Unknown16-1 connected primary 1280x720+0+0 right (normal right) 63mm x 112mm
720x1280 60.00*+
HDMI-1 disconnected
The suggested fix is to get a libsdl1.2.deb with xrandr enabled by default. @aTc ?Debian Bug report logs - #412058
libsdl1.2debian: XRandR rotation ignored when looking at resolutions for fullscreen mode
Using the xrandr -q bash command shows that it understands the screen rotation. It reports the rotated frame buffer size correctly and then the not-rotated display size
Bash:me@pyra:~$ xrandr -q Screen 0: minimum 320 x 200, current 1280 x 720, maximum 8192 x 8192 Unknown16-1 connected primary 1280x720+0+0 right (normal right) 63mm x 112mm 720x1280 60.00*+ HDMI-1 disconnected