History log of /drivers/gpu/drm/drm_modes.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c3c50e8b651887bcefcc13beb3739c00b2379b5c 12-Mar-2012 Ville Syrjälä <ville.syrjala@linux.intel.com> drm: Add drm_mode_copy()

Add a helper function to copy a display mode. Use it in
drm_mode_duplicate() and nouveau mode_fixup hooks.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
8bf42225dac865665a5a0f8bbe1b62139470ffa0 27-Jan-2012 Daniel Vetter <daniel.vetter@ffwll.ch> drm/modes: do not enforce an odd vtotal for interlaced modes

CEA actually specifies an interlaced mode with even vtotal and
supplies a diagram showing how this is supposed to work.

Note that interlaced modes with an even vtotal seem to be a fairly
recent invention. All modelines lore I could dig up with googling says
that vtotal for interlaced modes _needs_ to be odd. But the even
modelines in CEA are not a spec-bug, there's a figure in CEA-861-E
called "Figure 5 Special Interlaced Video Format Timing (Even Vtotal)"
that explains how it's supposed to work. Furthermore intel Bspec
explicitly mentions that both odd and even interlaced vtotal are
supported (VTOTAL register in the south display engine of PCH split
chips).

Acked-by: Adam Jackson <ajax@redhat.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
2d1a8a48ac68a835c42d8a31a02b8158cd599615 31-Aug-2011 Paul Gortmaker <paul.gortmaker@windriver.com> gpu: Add export.h as required to drivers/gpu files.

They need this to get all the EXPORT_SYMBOL variants and THIS_MODULE

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/gpu/drm/drm_modes.c
04fee895ef98ffbb91a941b53a92d6949bb6d1c4 15-Jun-2011 Rolf Eike Beer <eike-kernel@sf-tec.de> DRM: clean up and document parsing of video= parameter

The video= parameter of the DRM drivers supports some additional flags that
the normal fb drivers do not have. They also allow to limit these flags to
specific outputs. Both things were previously undocumented.

Also the parsing of the line had some oddities:
-A lot of misplaced options were silently ignored or partly rejected instead
of stopping the parsing immediately
-The 'R' option is documented to follow the 'M' option if specified. It is not
documented that 'M' is needed to specify 'R' (also this is the case for normal
fb drivers). In fact the code is correct for normal fb drivers but wrong for
DRM ones.
The old code allowed 'R' only _before_ 'M' (since it parses backwards) and only
if 'M' is given at all which is not needed for the DRM drivers.
-the margins option ('m') was parsed but later ignored even if the later
functions support it.
-specifying multiple enable options at the same time did not lead to an error.
-specifying something bogus for horizontal resolution (i.e. other things as
digits) did not lead to an error but an invalid resolution was used.

If any errors are encountered the position of the faulting string is now
printed to the user and the complete mode is ignored. This gives much
more consistent error behaviour.

I also removed some useless assignments and changed the local flag variables
to be bool.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
cb3c438ea4c0e638cba08bfaa8e2b64ffb8a6ce3 04-May-2011 Dave Airlie <airlied@redhat.com> drm/fb: fix CONFIG_DRM=m && CONFIG_FB=n

The previous commit to move the parsing into the core drm created a
new situation and a soft dependency on the CONFIG_FB. We really don't
want to make this a hard dependency so just wrap the one place that
actually needs an fb symbol.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
1794d257fa7bab3ea5162f8abdca749996b65343 17-Apr-2011 Chris Wilson <chris@chris-wilson.co.uk> drm: Export the command-line mode parser

In the absence of configuration data for providing the fixed mode for
a panel, I would like to be able to pass such modes along a separate
module paramenter. To do so, I then need to parse a modeline from a
string, which drm is already capable of. Export that capability to the
drivers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
b1f559ecdc6026ef783ccadc62a61e7da906fcb4 26-Jan-2011 Chris Wilson <chris@chris-wilson.co.uk> drm: Mark constant arrays of drm_display_mode const

... and fixup some methods to accept the constant argument.

Now that constant module arrays are loaded into read-only memory, using
const appropriately has some benefits beyond warning the programmer
about likely mistakes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
229aebb873e29726b91e076161649cf45154b0bf 24-Oct-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
Update broken web addresses in arch directory.
Update broken web addresses in the kernel.
Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
Revert "Fix typo: configuation => configuration" partially
ida: document IDA_BITMAP_LONGS calculation
ext2: fix a typo on comment in ext2/inode.c
drivers/scsi: Remove unnecessary casts of private_data
drivers/s390: Remove unnecessary casts of private_data
net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
drivers/infiniband: Remove unnecessary casts of private_data
drivers/gpu/drm: Remove unnecessary casts of private_data
kernel/pm_qos_params.c: Remove unnecessary casts of private_data
fs/ecryptfs: Remove unnecessary casts of private_data
fs/seq_file.c: Remove unnecessary casts of private_data
arm: uengine.c: remove C99 comments
arm: scoop.c: remove C99 comments
Fix typo configue => configure in comments
Fix typo: configuation => configuration
Fix typo interrest[ing|ed] => interest[ing|ed]
Fix various typos of valid in comments
...

Fix up trivial conflicts in:
drivers/char/ipmi/ipmi_si_intf.c
drivers/usb/gadget/rndis.c
net/irda/irnet/irnet_ppp.c
631dd1a885b6d7e9f6f51b4e5b311c2bb04c323c 18-Oct-2010 Justin P. Mattock <justinmattock@gmail.com> Update broken web addresses in the kernel.

The patch below updates broken web addresses in the kernel

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Ben Pfaff <blp@cs.stanford.edu>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
/drivers/gpu/drm/drm_modes.c
adde0f23396fe6c6cd4fe8e66e9cdc7d1f5081d9 23-Aug-2010 Adam Jackson <ajax@redhat.com> drm/modes: Fix CVT-R modeline generation

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16651

Signed-off-by: Adam Jackson <ajax@redhat.com>
Tested-by: Adam Serbinski <adam@serbinksi.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
c385e50cb51ace73ebe12d57df76882e9dcf0e53 08-Apr-2010 Adam Jackson <ajax@redhat.com> drm/edid: Fix sync polarity for secondary GTF curve

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
171fdd892979081e8a9b1a67ce86c7008b7abbdf 29-Mar-2010 Adam Jackson <ajax@redhat.com> drm/modes: Fix interlaced mode names

Height in frame size, not field size, and trailed with an 'i'. Matches
the X server behaviour.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
7a37435008b0ffea2442eb1134ddd4adeea81e19 29-Mar-2010 Adam Jackson <ajax@redhat.com> drm/edid: Add secondary GTF curve support

Before CVT-R, some monitors would advertise support for an alternative
GTF formula with lower blanking intervals. Correctly identify such
monitors, and use the alternative formula when generating modes for
them.

Note that we only do this for "standard" timing descriptors (tuples of
hsize in characters / aspect ratio / vertical refresh). Range-based
mode lists still only refer to the primary GTF curve. It would be
possible to do better for the latter case, but monitors are required to
support the primary curve over the entire advertised range, so all it
would win you is a lower pixel clock and therefore possibly better image
quality on analog links.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
2c761270d5520dd84ab0b4e47c24d99ff8503c38 12-Jan-2010 Dave Chinner <david@fromorbit.com> lib: Introduce generic list_sort function

There are two copies of list_sort() in the tree already, one in the DRM
code, another in ubifs. Now XFS needs this as well. Create a generic
list_sort() function from the ubifs version and convert existing users
to it so we don't end up with yet another copy in the tree.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/gpu/drm/drm_modes.c
7ac96a9cb4982140e206bf3b58236efb2498ab3f 03-Dec-2009 Adam Jackson <ajax@redhat.com> drm/modes: Add drm_mode_hsync()

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
d50ba256b5f1478e15accfcfda9b72fd7a661364 23-Sep-2009 Dave Airlie <airlied@linux.ie> drm/kms: start adding command line interface using fb.

[note this requires an fb patch posted to linux-fbdev-devel already]

This uses the normal video= command line option to control the kms
output setup at boot time. It is used to override the autodetection
done by kms.

video= normally takes a framebuffer as the first parameter, in kms
it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output
connector is specified the mode string will apply to all connectors.

The mode specification used will match down the probed modes, and if
no mode is found it will add a CVT mode that matches.

video=1024x768 - all connectors match a 1024x768 mode or add a CVT on
video=VGA-1:1024x768, VGA-1 connector gets mode only.

The same strings as used in current fb modedb.c are used, except I've
added three more letters, e, D, d, e = enable, D = enable Digital,
d = disable, which allow a connector to be forced into a certain state.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
559ee21d261a54c42594ef9405d27e9008eedf44 03-Sep-2009 Zhao Yakui <yakui.zhao@intel.com> drm/kms: try to find the std mode in DMT table

When we need to add the standard timing mode, we will firstly check whether it
can be found in DMT table by comparing the hdisplay/vdisplay/vfresh_rate.
If it can't be found, then we will use the cvt/gtf to add the required mode.
If it can be found, it will be returned.

At the same time the function of drm_mode_vrefresh is also fixed. It will
return the result of actual refresh_rate plus 0.5.
For example:
When the calculated value is 84.9, then the fresh_rate is 85.
When the calculated value is 70.02, then the fresh_rate is 70.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
51c8b4071d84d46cc100baa5931ad06b2a823c95 20-Aug-2009 Dave Airlie <airlied@redhat.com> Merge Linus master to drm-next

linux-next conflict reported needed resolution.

Conflicts:
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/radeon/radeon_ttm.c
drivers/gpu/drm/ttm/ttm_bo.c
841b4117b30d544690fceb952037b1cddf14783f 12-Aug-2009 Francisco Jerez <currojerez@riseup.net> drm: Fix drm_cvt_mode() for interlaced modes.

The calculated vdisplay was half the right value.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
38d5487db7f289be1d56ac7df704ee49ed3213b9 20-Jul-2009 Keith Packard <keithp@keithp.com> drm: When adding probed modes, preserve duplicate mode types

The code which takes probed modes and adds them to a connector eliminates
duplicate modes by comparing them using drm_mode_equal. That function
doesn't consider the type bits, which means that any modes which differ only
in the type field will be lost.

One of the bits in the mode->type field is the DRM_MODE_TYPE_PREFERRED bit.
If the mode with that bit is lost, then higher level code will not know
which mode to select, causing a random mode to be used instead.

This patch simply merges the two mode type bits together; that seems
reasonable to me, but perhaps only a subset of the bits should be used? None
of these can be user defined as they all come from looking at just the
hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
f940f37f022f7392ab81a35516222cbd46110b42 20-Jul-2009 Zhao Yakui <yakui.zhao@intel.com> drm: Remove the macro defintion of DRM_DEBUG_MODE

Two macro definitions of DRM_DEBUG_KMS/MODE can be used to add the debug
info related with KMS. It is confusing.
So remove the macro definition of DRM_DEBUG_MODE. Instead it can be replaced
by the DRM_DEBUG_KMS.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
8a4c47f346cc7a12d0897c05eb3cc1add26b487f 20-Jul-2009 Zhao Yakui <yakui.zhao@intel.com> drm: Remove the unused prefix in DRM_DEBUG_KMS/DRIVER/MODE

We will have to add a prefix when using the macro defintion of DRM_DEBUG_KMS
/DRM_DEBUG_DRIVER/MODE. It is not convenient. We should use the DRM_NAME
as default prefix.
So remove the prefix in the macro definition of DRM_DEBUG_KMS/DRIVER/MODE.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
26bbdadad356ec02d33657858d91675f3e9aca94 22-Jun-2009 Zhao Yakui <yakui.zhao@intel.com> drm/mode: add the GTF algorithm in kernel space

Add the GTF algorithm in kernel space. And this function can be called to
generate the required modeline.

I copied it from the file of xserver/hw/xfree86/modes/xf86gtf.c. What I have
done is to translate it by using integer calculation. This is to avoid
the float-point calculation in kernel space.
At the same tie I also refer to the function of fb_get_mode in
drivers/video/fbmon.c

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
/drivers/gpu/drm/drm_modes.c
d782c3f95c9263dc0b98e7115f75f1e18b9600b3 22-Jun-2009 Zhao Yakui <yakui.zhao@intel.com> drm/mode: add the CVT algorithm in kernel space

Add the CVT algorithm in kernel space. And this function can be called to
generate the required modeline.

I copied it from the file of xserver/hw/xfree86/modes/xf86cvt.c. What I have
done is to translate it by using integer calculation. This is to avoid
the float-point calculation in kernel space.

[airlied:- cleaned up some bits]
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
/drivers/gpu/drm/drm_modes.c
f053185948a1bd16329433f5371809765086c1ec 02-Jun-2009 yakui_zhao <yakui.zhao@intel.com> drm: Replace DRM_DEBUG with DRM_DEBUG_MODE in drm_mode

Replace the DRM_DEBUG with DRM_DEBUG_MODE macro to print the info in drm_mode.

airlied:- fixed up to remove a conflicting #define
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c
f453ba0460742ad027ae0c4c7d61e62817b3e7ef 07-Nov-2008 Dave Airlie <airlied@redhat.com> DRM: add mode setting support

Add mode setting support to the DRM layer.

This is a fairly big chunk of work that allows DRM drivers to provide
full output control and configuration capabilities to userspace. It was
motivated by several factors:
- the fb layer's APIs aren't suited for anything but simple
configurations
- coordination between the fb layer, DRM layer, and various userspace
drivers is poor to non-existent (radeonfb excepted)
- user level mode setting drivers makes displaying panic & oops
messages more difficult
- suspend/resume of graphics state is possible in many more
configurations with kernel level support

This commit just adds the core DRM part of the mode setting APIs.
Driver specific commits using these new structure and APIs will follow.

Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com>
Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com>

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/drm_modes.c