setting the mode for a generic mode

OK, the “Odd mode list” thread answer was interesting, as we can now see
that the banshee driver uses the generic stuff, but we can’t get the mode
set. It ends up trapping. I’ll see if we can get a straight C sample, but
in the meantime, one thing I noticed is that for the generic modes, the
<disp_crtc_settings_t *settings> parm is used. We are setting a couple of
fields in there, and the doc mentions a
modefuncs.get_current_crtc_settings() that isn’t in the mode.h include file.
Bummer, as I was thinking we could initialize the disp_crtc_settings_t
structure with that function, then tweak what we wanted to.

So, we need to know which fields in disp_crtc_settings need to be set.

Patrick_Mueller@oti.com

Patrick Mueller <patrick_mueller@oti.com> wrote:
: OK, the “Odd mode list” thread answer was interesting, as we can now see
: that the banshee driver uses the generic stuff, but we can’t get the mode
: set. It ends up trapping. I’ll see if we can get a straight C sample, but
: in the meantime, one thing I noticed is that for the generic modes, the
: <disp_crtc_settings_t *settings> parm is used. We are setting a couple of
: fields in there, and the doc mentions a
: modefuncs.get_current_crtc_settings() that isn’t in the mode.h include file.
: Bummer, as I was thinking we could initialize the disp_crtc_settings_t
: structure with that function, then tweak what we wanted to.

Unfortunately the docs are not quite up to date with the source code.
(source code is current - docs are older) They should be updated in
a future release.

The get_current_crtc_settings() no longer exists.


: So, we need to know which fields in disp_crtc_settings need to be set.

If you fill in fields xres, yres, and refresh, you can call disp_crtc_calc()
which will fill in the remaining members of the disp_crtc_settings_t
structure. See the graphics DDK docs section Libraries for info on
disp_crtc_calc.


: –
: ----------------------------------------------------
: Patrick_Mueller@oti.com
: ----------------------------------------------------

Michael Van Reenen <mvr@qnx.com> wrote:
: Patrick Mueller <patrick_mueller@oti.com> wrote:
: : OK, the “Odd mode list” thread answer was interesting, as we can now see
: : that the banshee driver uses the generic stuff, but we can’t get the mode
: : set. It ends up trapping. I’ll see if we can get a straight C sample, but
: : in the meantime, one thing I noticed is that for the generic modes, the
: : <disp_crtc_settings_t *settings> parm is used. We are setting a couple of
: : fields in there, and the doc mentions a
: : modefuncs.get_current_crtc_settings() that isn’t in the mode.h include file.
: : Bummer, as I was thinking we could initialize the disp_crtc_settings_t
: : structure with that function, then tweak what we wanted to.

: Unfortunately the docs are not quite up to date with the source code.
: (source code is current - docs are older) They should be updated in
: a future release.

: The get_current_crtc_settings() no longer exists.


: : So, we need to know which fields in disp_crtc_settings need to be set.

: If you fill in fields xres, yres, and refresh, you can call disp_crtc_calc()
: which will fill in the remaining members of the disp_crtc_settings_t
: structure. See the graphics DDK docs section Libraries for info on
: disp_crtc_calc.


It has been pointed out to me that you should also fill in the h_granularity
and v_granularity fields of the disp_crtc_settings_t structure.

Another thing of note relating to the “Odd mode list” thread is that when
before each call to modef.get_modeinfo the disp_mode_info_t structure should
be memset to 0.


: : –
: : ----------------------------------------------------
: : Patrick_Mueller@oti.com
: : ----------------------------------------------------