dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Greene <richard.greene@autodesk.com>
To: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Cc: Jason Lefley <jason.lefley@autodesk.com>
Subject: SDL and drm driver
Date: Tue, 2 Feb 2016 23:56:53 +0000	[thread overview]
Message-ID: <D2D68244.17406%richard.greene@autodesk.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3104 bytes --]

Hello,

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.

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 git://anongit.freedesktop.org/mesa/drm) 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.

For example, when this line is in uEnv.txt:
kms_force_mode=video=HDMI-A-1:912x1140M@60

and in the modified modetest, with count == 1, I call:

parse_connector(&pipe_args[count], "5:1280x800")

...

set_mode(&dev, pipe_args, count)


It then reports:

setting mode 1280x800-60Hz@XR24 on connectors 5, crtc 3


But SDL_GetVideoInfo still reports the mode as 912x1140, and on attempting to use SDL_SetVideoMode to set it to 1280x800, it fails with the error message:

No video mode large enough for 1280x800


FYI, the output of the (unmodified) modetest when using this same uEnv.txt file is shown below.


Richard


trying to open device 'i915'...failed

trying to open device 'radeon'...failed

trying to open device 'nouveau'...failed

trying to open device 'vmwgfx'...failed

trying to open device 'omapdrm'...failed

trying to open device 'exynos'...failed

trying to open device 'tilcdc'...done

Encoders:

id crtc type possible crtcs possible clones

4 3 TMDS 0x00000001 0x00000000


Connectors:

id encoder status name size (mm) modes encoders

5 4 connected HDMI-A-1       520x320 4 4

  modes:

name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)

  1280x800 60 1280 1352 1480 1680 800 810 816 831 flags: phsync, pvsync; type: preferred, driver

  912x1140 60 912 952 1016 1192 1140 1150 1156 1170 flags: phsync, pvsync; type: driver

  752x470 70 752 776 856 960 470 471 474 490 flags: nhsync, pvsync; type:

  720x450 60 720 736 808 896 450 451 454 466 flags: nhsync, pvsync; type:

  props:

1 EDID:

flags: immutable blob

blobs:


value:

00ffffffffffff001190004501000000

0d170103803420a002ee95a3544c9926

0f505400000001000100010001000100

0100010001009e20009051201f304880

a60006442100001ea820901831741e40

2840a60006442100001e000000fc004c

437220343530300a20202020000000fa

001d003b003f0a2020010001000a00db

2 DPMS:

flags: enum

enums: On=0 Standby=1 Suspend=2 Off=3

value: 1


CRTCs:

id fb pos size

3 10 (0,0) (912x1140)

  912x1140 60 912 952 1016 1192 1140 1150 1156 1170 flags: phsync, pvsync; type: driver

  props:


Planes:

id crtc fb CRTC x,y x,y gamma size possible crtcs


Frame buffers:

id size pitch


[-- Attachment #1.2: Type: text/html, Size: 11347 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2016-02-03  0:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D2D68244.17406%richard.greene@autodesk.com \
    --to=richard.greene@autodesk.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jason.lefley@autodesk.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox