aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_modes.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-13drm/doc: Repleace LOCKING kerneldoc sections in drm_modes.cDaniel Vetter1-57/+2
There's not really any value in stating that no locking is needed. And even if the comment is useful, a check for the right mutex at the beginning of the function is better since that can't be ingored as easily as a bit of documentation. Note that drm_mode_probed_add in drm_crtc.c is also changed, the next patch will move this into drm_modes.c v2: Don't add locking WARN_ONs where it is not strictly required (i.e. the two functions to validate/prune mode lists). Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2014-03-13drm/doc: Integrate drm_modes.c kerneldocDaniel Vetter1-11/+17
And clean it up so that there's no kerneldoc warnings. There's still a lot to do with this one here. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2014-01-14Revert "drm: copy mode type in drm_mode_connector_list_update()"Dave Airlie1-1/+1
This reverts commit 3fbd6439e4639ecaeaae6c079e0aa497a1ac3482. This caused some strange booting lockup issues on an Intel G33 belonging to Daniel Vetter, very unusual, I was hoping Daniel would track this down, but it looks like instead I'll have to hack a different fix for -next. Signed-off-by: Dave Airlie <[email protected]>
2013-10-23drm: copy mode type in drm_mode_connector_list_update()Marc-André Lureau1-1/+1
In commit 38d5487db7f289be1d56ac7df704ee49ed3213b9, Keith explained: 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. However, merging the bits means that a flag becomes sticky. It is not possible, for example to update the mode type to remove the DRM_MODE_TYPE_PREFERRED bit. After a brief discussion with Dave Airlie on irc, it was agreed to propose that change, instead of introducing another function to remove a bit from exisiting modes type. Signed-off-by: Marc-André Lureau <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-10-01drm: Implement timings adjustments for frame packingDamien Lespiau1-1/+21
When using the frame packing and a single big framebuffer, some hardware requires that we do everything like if we were scanning out the big buffer itself. Let's instrument drm_mode_set_crtcinfo() to be able to do this adjustement if the driver is asking for it. v2: Use crtc_vtotal and multiply the clock by 2 instead of reconstructing it (Ville Syrjälä) Suggested-by: Daniel Vetter <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Acked-by: Dave Airlie <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-10-01drm: Introduce a crtc_clock for struct drm_display_modeDamien Lespiau1-0/+1
Just like the various timings, make it possible to have a clock field what we can tweak before giving it to hardware. Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Acked-by: Dave Airlie <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-10-01drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modesDamien Lespiau1-6/+12
When scanning out a stereo mode, the AVI infoframe vic field has to be the underlyng 2D VIC. Before that commit, we weren't matching the CEA mode because of the extra stereo flag and then were setting the VIC field in the AVI infoframe to 0. Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Acked-by: Dave Airlie <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-08-21drm: Remove drm_mode_list_concat()Lespiau, Damien1-21/+0
The last user was removed in commit 575dc34ee0de867ba83abf25998e0963bff451fa Author: Dave Airlie <[email protected]> Date: Mon Sep 7 18:43:26 2009 +1000 drm/kms: remove old std mode fallback code. The new code adds modes in the helper, which makes more sense I disliked the non-driver code adding modes. Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-08-19drm: Remove drm_mode_validate_clocksStéphane Marchesin1-37/+0
This function is unused. Signed-off-by: Stéphane Marchesin <[email protected]> Reviewed-by: David Herrmann <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-06-11drm: Sort connector modes based on vrefreshVille Syrjälä1-0/+5
Keeping the modes sorted by vrefresh before the pixel clock makes the mode list somehow more pleasing to the eye. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-06-11drm: Preserve the list head in drm_mode_copyVille Syrjälä1-3/+4
Preserve the destination mode's list head in drm_mode_copy. Just in case someone decides that it's a good idea to overwrite a mode which happens to be on some list, Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-06-03drm_modes: videomode: add doubleclk flagSteffen Trumtrar1-0/+2
Signed-off-by: Steffen Trumtrar <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-13Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-0/+1
Pull drm fixes from Dave Airlie: "Just a few straggling fixes I hoovered up, and an intel fixes pull from Daniel which fixes some regressions, and some mgag200 fixes from Matrox." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: drm/mgag200: Fix framebuffer base address programming drm/mgag200: Convert counter delays to jiffies drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL register drm/mgag200: Don't change unrelated registers during modeset drm: Only print a debug message when the polled connector has changed drm: Make the HPD status updates debug logs more readable drm: Use names of ioctls in debug traces drm: Remove pointless '-' characters from drm_fb_helper documentation drm: Add kernel-doc for drm_fb_helper_funcs->initial_config drm: refactor call to request_module drm: Don't prune modes loudly when a connector is disconnected drm: Add missing break in the command line mode parsing code drm/i915: clear the stolen fb before resuming Revert "drm/i915: Calculate correct stolen size for GEN7+" drm/i915: hsw: fix link training for eDP on port-A Revert "drm/i915: revert eDP bpp clamping code changes" drm: don't check modeset locks in panic handler drm/i915: Fix pipe enabled mask for pipe C in WM calculations drm/mm: fix dump table BUG drm/i915: Always normalize return timeout for wait_timeout_ioctl
2013-05-10drm: Add missing break in the command line mode parsing codeDamien Lespiau1-0/+1
As we parse the string given on the command line one char at a time, it seems that we do want a break at every case. Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-02Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-1/+21
Pull drm updates from Dave Airlie: "This is the main drm pull request for 3.10. Wierd bits: - OMAP drm changes required OMAP dss changes, in drivers/video, so I took them in here. - one more fbcon fix for font handover - VT switch avoidance in pm code - scatterlist helpers for gpu drivers - have acks from akpm Highlights: - qxl kms driver - driver for the spice qxl virtual GPU Nouveau: - fermi/kepler VRAM compression - GK110/nvf0 modesetting support. Tegra: - host1x core merged with 2D engine support i915: - vt switchless resume - more valleyview support - vblank fixes - modesetting pipe config rework radeon: - UVD engine support - SI chip tiling support - GPU registers initialisation from golden values. exynos: - device tree changes - fimc block support Otherwise: - bunches of fixes all over the place." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits) qxl: update to new idr interfaces. drm/nouveau: fix build with nv50->nvc0 drm/radeon: fix handling of v6 power tables drm/radeon: clarify family checks in pm table parsing drm/radeon: consolidate UVD clock programming drm/radeon: fix UPLL_REF_DIV_MASK definition radeon: add bo tracking debugfs drm/radeon: add new richland pci ids drm/radeon: add some new SI PCI ids drm/radeon: fix scratch reg handling for UVD fence drm/radeon: allocate SA bo in the requested domain drm/radeon: fix possible segfault when parsing pm tables drm/radeon: fix endian bugs in atom_allocate_fb_scratch() OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found OMAPDSS: VENC: Add error handling for venc_probe_pdata OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata OMAPDSS: DSI: Add error handling for dsi_probe_pdata OMAPDSS: SDI: Add error handling for sdi_probe_pdata OMAPDSS: DPI: Add error handling for dpi_probe_pdata ...
2013-04-26drm: Add drm_mode_equal_no_clocks()Ville Syrjälä1-1/+21
drm_mode_equal_no_clocks() is like drm_mode_equal() except it doesn't compare the clock or vrefresh values. drm_mode_equal() is now implemented by first doing the clock checks, and then calling drm_mode_equal_no_clocks(). v2: Add missing EXPORT_SYMBOL() Reviewed-by: Paulo Zanoni <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-03-12videomode: combine videomode dmt_flags and data_flagsTomi Valkeinen1-6/+6
Both videomode and display_timing contain flags describing the modes. These are stored in dmt_flags and data_flags. There's no need to separate these flags, and having separate fields just makes the flags more difficult to use. This patch combines the fields and renames VESA_DMT_* flags to DISPLAY_FLAGS_*. Signed-off-by: Tomi Valkeinen <[email protected]> Cc: Steffen Trumtrar <[email protected]>
2013-03-12videomode: simplify videomode Kconfig and MakefileTomi Valkeinen1-4/+4
This patch simplifies videomode related Kconfig and Makefile. After this patch, there's only one non-user selectable Kconfig option left, VIDEOMODE_HELPERS. The reasons for the change: * Videomode helper functions are not something that should be shown in the kernel configuration options. The related code should just be included if it's needed, i.e. selected by drivers using videomode. * There's no need to have separate Kconfig options for videomode and display_timing. First of all, the amount of code for both is quite small. Second, videomode depends on display_timing, and display_timing in itself is not really useful, so both would be included in any case. * CONFIG_VIDEOMODE is a bit vague name, and CONFIG_VIDEOMODE_HELPERS describes better what's included. Signed-off-by: Tomi Valkeinen <[email protected]> Cc: Steffen Trumtrar <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2013-01-24drm_modes: add of_videomode helpersSteffen Trumtrar1-0/+33
Add helper to get drm_display_mode from devicetree. Signed-off-by: Steffen Trumtrar <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Acked-by: Thierry Reding <[email protected]> Tested-by: Thierry Reding <[email protected]> Tested-by: Philipp Zabel <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Tested-by: Afzal Mohammed <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Leela Krishna Amudala <[email protected]>
2013-01-24drm_modes: add videomode helpersSteffen Trumtrar1-0/+37
Add conversion from videomode to drm_display_mode Signed-off-by: Steffen Trumtrar <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Acked-by: Thierry Reding <[email protected]> Tested-by: Thierry Reding <[email protected]> Tested-by: Philipp Zabel <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Tested-by: Afzal Mohammed <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Leela Krishna Amudala <[email protected]>
2012-11-07drm: Constify some function argumentsVille Syrjälä1-4/+4
None of drm_mode_debug_printmodeline(), drm_mode_equal(), drm_mode_width() or drm_mode_height() change the mode passed in, so make the arguments const. Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells1-2/+2
Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by: David Howells <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>
2012-10-02UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/.David Howells1-1/+0
Remove redundant DRM UAPI header #inclusions from drivers/gpu/. Remove redundant #inclusions of core DRM UAPI headers (drm.h, drm_mode.h and drm_sarea.h). They are now #included via drmP.h and drm_crtc.h via a preceding patch. Without this patch and the patch to make include the UAPI headers from the core headers, after the UAPI split, the DRM C sources cannot find these UAPI headers because the DRM code relies on specific -I flags to make #include "..." work on headers in include/drm/ - but that does not work after the UAPI split without adding more -I flags. Signed-off-by: David Howells <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>
2012-08-22drm: Remove two unused fields from struct drm_display_modeDamien Lespiau1-3/+0
Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-03-15drm: Add drm_mode_copy()Ville Syrjälä1-5/+23
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ä <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-02-13drm/modes: do not enforce an odd vtotal for interlaced modesDaniel Vetter1-2/+0
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 <[email protected]> Signed-Off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-31gpu: Add export.h as required to drivers/gpu files.Paul Gortmaker1-0/+1
They need this to get all the EXPORT_SYMBOL variants and THIS_MODULE Signed-off-by: Paul Gortmaker <[email protected]>
2011-07-25DRM: clean up and document parsing of video= parameterRolf Eike Beer1-27/+60
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-05-04drm/fb: fix CONFIG_DRM=m && CONFIG_FB=nDave Airlie1-0/+2
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-04-28drm: Export the command-line mode parserChris Wilson1-0/+154
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-23drm: Mark constant arrays of drm_display_mode constChris Wilson1-3/+3
... 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-10-24Merge branch 'for-next' of ↵Linus Torvalds1-1/+1
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
2010-10-18Update broken web addresses in the kernel.Justin P. Mattock1-1/+1
The patch below updates broken web addresses in the kernel Signed-off-by: Justin P. Mattock <[email protected]> Cc: Maciej W. Rozycki <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Finn Thain <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Matt Turner <[email protected]> Cc: Dimitry Torokhov <[email protected]> Cc: Mike Frysinger <[email protected]> Acked-by: Ben Pfaff <[email protected]> Acked-by: Hans J. Koch <[email protected]> Reviewed-by: Finn Thain <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-08-27drm/modes: Fix CVT-R modeline generationAdam Jackson1-1/+4
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16651 Signed-off-by: Adam Jackson <[email protected]> Tested-by: Adam Serbinski <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-09drm/edid: Fix sync polarity for secondary GTF curveAdam Jackson1-1/+4
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/modes: Fix interlaced mode namesAdam Jackson1-9/+12
Height in frame size, not field size, and trailed with an 'i'. Matches the X server behaviour. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Add secondary GTF curve supportAdam Jackson1-27/+54
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-01-12lib: Introduce generic list_sort functionDave Chinner1-86/+4
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 <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Artem Bityutskiy <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-12-04drm/modes: Add drm_mode_hsync()Adam Jackson1-1/+27
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-09-25drm/kms: start adding command line interface using fb.Dave Airlie1-2/+1
[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 <[email protected]>
2009-09-07drm/kms: try to find the std mode in DMT tableZhao Yakui1-5/+6
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-20Merge Linus master to drm-nextDave Airlie1-0/+2
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
2009-08-13drm: Fix drm_cvt_mode() for interlaced modes.Francisco Jerez1-1/+1
The calculated vdisplay was half the right value. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-09drm: When adding probed modes, preserve duplicate mode typesKeith Packard1-0/+2
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-04drm: Remove the macro defintion of DRM_DEBUG_MODEZhao Yakui1-2/+2
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 <[email protected]> Acked-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-08-04drm: Remove the unused prefix in DRM_DEBUG_KMS/DRIVER/MODEZhao Yakui1-5/+3
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 <[email protected]> Acked-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-15drm/mode: add the GTF algorithm in kernel spaceZhao Yakui1-0/+197
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-07-15drm/mode: add the CVT algorithm in kernel spaceZhao Yakui1-0/+219
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2009-06-12drm: Replace DRM_DEBUG with DRM_DEBUG_MODE in drm_modeyakui_zhao1-7/+11
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2008-12-29DRM: add mode setting supportDave Airlie1-0/+576
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 <[email protected]>, Jakob Bornecrantz <[email protected]> Contributors: Alan Hourihane <[email protected]>, Maarten Maathuis <[email protected]> Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>