neutrino: Add switch osd resolution when supported from hardware

- At the moment supported hardware: CS HD2

 Currently known problems:
 -------------------------
 - Display menus after changing resolution (Reboot required)
 - Display headers after changing resolution hd => fullhd (Reboot required)
 - Display infobar after changing resolution hd => fullhd (Reboot required)
 - Screenshot broken (With new driver and set resolution to 1280x720)


Origin commit data
------------------
Branch: ni/coolstream
Commit: 7b158903f8
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-13 (Mon, 13 Feb 2017)

Origin message was:
------------------
neutrino: Add switch osd resolution when supported from hardware

 - At the moment supported hardware: CS HD2

 Currently known problems:
 -------------------------
 - Display menus after changing resolution (Reboot required)
 - Display headers after changing resolution hd => fullhd (Reboot required)
 - Display infobar after changing resolution hd => fullhd (Reboot required)
 - Screenshot broken (With new driver and set resolution to 1280x720)


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2017-02-13 12:49:37 +01:00
parent 346923a66b
commit 3903507312
15 changed files with 338 additions and 80 deletions

View File

@@ -185,12 +185,32 @@ void CFbAccelCSHD2::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_
CFrameBuffer::blitBox2FB(boxBuf, width, height, xoff, yoff);
}
void CFbAccelCSHD2::setOsdResolutions()
{
/* FIXME: Infos available in driver? */
osd_resolution_t res;
osd_resolutions.clear();
res.xRes = 1280;
res.yRes = 720;
res.bpp = 32;
osd_resolutions.push_back(res);
if (fullHdAvailable()) {
res.xRes = 1920;
res.yRes = 1080;
res.bpp = 32;
osd_resolutions.push_back(res);
}
}
int CFbAccelCSHD2::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp)
{
if (!available&&!active)
return -1;
if (available >= 16588800) { /* new fb driver with maxres 1920x1080(*8) */
if (osd_resolutions.empty())
setOsdResolutions();
if (fullHdAvailable()) {
screeninfo.xres_virtual=screeninfo.xres=nxRes;
screeninfo.yres_virtual=screeninfo.yres=nyRes;
screeninfo.height=0;
@@ -272,3 +292,10 @@ int CFbAccelCSHD2::scaleFont(int size)
return size;
}
bool CFbAccelCSHD2::fullHdAvailable()
{
if (available >= 16588800) /* new fb driver with maxres 1920x1080(*8) */
return true;
return false;
}