<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hello,</div>
<div><br>
</div>
<div>I'm finding that attempts to change the video mode via libdrm don't allow SDL to use that mode, and I'm wondering if anyone can tell me why or what I might need to do to make it work.</div>
<div><br>
</div>
<div>I'm using SDL 1.2 on a BeagleBone Black running Wheezy, 3.8.13-bone71, and Rob Clark's tilcdc/tda998x drm driver. I can boot into either of two video modes using the appropriate kms_force_mode setting in uEnv.txt. When I run a modified version of modetest
(built from <span style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: 'Courier New', Courier; font-size: 12px; line-height: 20px; white-space: pre-wrap; widows: 1;">git://anongit.freedesktop.org/mesa/drm</span>) that sets the
opposite mode from the one defined in uEnv.txt and then calls SDL_Init and SDL_GetVideoInfo, the later always finds the same mode as was set in uEnv.txt. Then a call to SDL_SetVideoMode (also with the opposite of the uEnv.txt mode) always fails, just as it
does if I hadn't attempted to change the mode via libdrm.</div>
<div><br>
</div>
<div>For example, when this line is in uEnv.txt:</div>
<div>kms_force_mode=video=HDMI-A-1:912x1140M@60</div>
<div><br>
</div>
<div>and in the modified modetest, with count == 1, I call:</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">parse_connector(&pipe_args[count],
<span style="color: #d12f1b">"5:1280x800"</span>)</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">…</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">set_mode(&dev, pipe_args, count)</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">It then reports:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">setting mode 1280x800-60Hz@XR24 on connectors 5, crtc 3</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">But <span style="font-family: Calibri, sans-serif; font-size: 14px;">SDL_GetVideoInfo still reports the mode as 912x1140, and on attempting to use </span><span style="font-family: Calibri, sans-serif; font-size: 14px;">SDL_SetVideoMode
to set it to 1280x800, it fails with the error message:</span> </p>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">No video mode large enough for 1280x800</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">FYI, the output of the (unmodified) modetest when using this same uEnv.txt file is shown below.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
</div>
<div>Richard</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'i915'...failed</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'radeon'...failed</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'nouveau'...failed</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'vmwgfx'...failed</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'omapdrm'...failed</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'exynos'...failed</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">trying to open device 'tilcdc'...done</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Encoders:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">id<span class="Apple-tab-span" style="white-space:pre">
</span>crtc<span class="Apple-tab-span" style="white-space:pre"> </span>type<span class="Apple-tab-span" style="white-space:pre">
</span>possible crtcs<span class="Apple-tab-span" style="white-space:pre"> </span>
possible clones<span class="Apple-tab-span" style="white-space:pre"> </span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">4<span class="Apple-tab-span" style="white-space:pre">
</span>3<span class="Apple-tab-span" style="white-space:pre"> </span>TMDS<span class="Apple-tab-span" style="white-space:pre">
</span>0x00000001<span class="Apple-tab-span" style="white-space:pre"> </span>0x00000000</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Connectors:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">id<span class="Apple-tab-span" style="white-space:pre">
</span>encoder<span class="Apple-tab-span" style="white-space:pre"> </span>status<span class="Apple-tab-span" style="white-space:pre">
</span>name<span class="Apple-tab-span" style="white-space:pre"> </span>size (mm)<span class="Apple-tab-span" style="white-space:pre">
</span>modes<span class="Apple-tab-span" style="white-space:pre"> </span>encoders</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">5<span class="Apple-tab-span" style="white-space:pre">
</span>4<span class="Apple-tab-span" style="white-space:pre"> </span>connected<span class="Apple-tab-span" style="white-space:pre">
</span>HDMI-A-1 <span class="Apple-tab-span" style="white-space:pre"></span>520x320<span class="Apple-tab-span" style="white-space:pre">
</span>4<span class="Apple-tab-span" style="white-space:pre"> </span>4</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> modes:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> 1280x800 60 1280 1352 1480 1680 800 810 816 831 flags: phsync, pvsync; type: preferred, driver</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> 912x1140 60 912 952 1016 1192 1140 1150 1156 1170 flags: phsync, pvsync; type: driver</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> 752x470 70 752 776 856 960 470 471 474 490 flags: nhsync, pvsync; type: </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> 720x450 60 720 736 808 896 450 451 454 466 flags: nhsync, pvsync; type: </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> props:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>1 EDID:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>flags: immutable blob</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>blobs:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>value:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>00ffffffffffff001190004501000000</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>0d170103803420a002ee95a3544c9926</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>0f505400000001000100010001000100</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>0100010001009e20009051201f304880</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>a60006442100001ea820901831741e40</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>2840a60006442100001e000000fc004c</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>437220343530300a20202020000000fa</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>001d003b003f0a2020010001000a00db</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>2 DPMS:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>flags: enum</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>enums: On=0 Standby=1 Suspend=2 Off=3</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre"></span>value: 1</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">CRTCs:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">id<span class="Apple-tab-span" style="white-space:pre">
</span>fb<span class="Apple-tab-span" style="white-space:pre"> </span>pos<span class="Apple-tab-span" style="white-space:pre">
</span>size</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">3<span class="Apple-tab-span" style="white-space:pre">
</span>10<span class="Apple-tab-span" style="white-space:pre"> </span>(0,0)<span class="Apple-tab-span" style="white-space:pre">
</span>(912x1140)</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> 912x1140 60 912 952 1016 1192 1140 1150 1156 1170 flags: phsync, pvsync; type: driver</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"> props:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Planes:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">id<span class="Apple-tab-span" style="white-space:pre">
</span>crtc<span class="Apple-tab-span" style="white-space:pre"> </span>fb<span class="Apple-tab-span" style="white-space:pre">
</span>CRTC x,y<span class="Apple-tab-span" style="white-space:pre"> </span>x,y<span class="Apple-tab-span" style="white-space:pre">
</span>gamma size<span class="Apple-tab-span" style="white-space:pre"> </span>possible crtcs</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Frame buffers:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">id<span class="Apple-tab-span" style="white-space:pre">
</span>size<span class="Apple-tab-span" style="white-space:pre"> </span>pitch</p>
</div>
<div><br>
</div>
</body>
</html>