summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_crtc.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | drm: add DRM_CAPs for cursor sizeAlex Deucher2014-02-181-0/+3
|/ | | | | | | | | | | | | Some hardware may not support standard 64x64 cursors. Add a drm cap to query the cursor size from the kernel. Some examples include radeon CIK parts (128x128 cursors) and armada (32x64 or 64x32). This allows things like device specific ddxes to remove asics specific logic and also allows xf86-video-modesetting to work properly with hw cursors on this hardware. Default to 64 if the driver doesn't specify a size. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* Merge tag 'drm/for-3.14-rc1-20140123' of ↵Dave Airlie2014-01-291-0/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v3.14-rc1 (update) These patches fix some issues caused by the DRM panel support from the previous pull request and add two more panels (for the Toshiba AC100 as well as the Seaboard and Ventana). * tag 'drm/for-3.14-rc1-20140123' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: Obtain head number from DT drm/panel: update EDID BLOB in panel_simple_get_modes() gpu: host1x: Remove unnecessary include drm/tegra: Use proper data type drm/tegra: Clarify how panel modes override others drm/tegra: Fix possible CRTC mask for RGB outputs drm/i915: Use drm_encoder_crtc_ok() drm: Move drm_encoder_crtc_ok() to core drm: provide a helper for the encoder possible_crtcs mask drm/tegra: Don't check resource with devm_ioremap_resource() drm/panel: Add support for Chunghwa CLAA101WA01A panel drm/panel: Add support for Samsung LTN101NT05 panel
| * drm: Move drm_encoder_crtc_ok() to coreThierry Reding2014-01-141-0/+13
| | | | | | | | | | | | | | | | Using the new drm_crtc_mask() function, drm_encoder_crtc_ok() can now be written in a significantly shorter way, so it can be moved to a header file and be made static inline. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * drm: provide a helper for the encoder possible_crtcs maskRussell King2014-01-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The encoder possible_crtcs mask identifies which CRTCs can be bound to a particular encoder. Each bit from bit 0 defines an index in the list of CRTCs held in the DRM mode_config crtc_list. Rather than having drivers trying to track the position of their CRTCs in the list, expose the code which already exists for calculating the appropriate mask bit for a CRTC. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> [treding@nvidia.com: add drm_crtc_index(), move to core] Signed-off-by: Thierry Reding <treding@nvidia.com>
* | Merge branch 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux into ↵Dave Airlie2014-01-221-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next Here's the vblank timestamp pull request you wanted. I addressed the few bugs that Mario pointed out and added the r-bs. As it has been a while since I made the changes, I gave it a quick spin on a few different i915 machines. Fortunately everything still seems to be fine. * 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux: drm/i915: Add a kludge for DSL incrementing too late and ISR not working drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos() drm: Pass 'flags' from the caller to .get_scanout_position() drm: Fix vblank timestamping constants for interlaced modes drm/i915: Fix scanoutpos calculations for interlaced modes drm: Change {pixel,line,frame}dur_ns from s64 to int drm: Use crtc_clock in drm_calc_timestamping_constants() drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings() drm: Simplify the math in drm_calc_timestamping_constants() drm: Improve drm_calc_timestamping_constants() documentation drm/i915: Call drm_calc_timestamping_constants() earlier drm/i915: Kill hwmode save/restore drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos() drm: Pass the display mode to drm_calc_timestamping_constants()
| * | drm: Change {pixel,line,frame}dur_ns from s64 to intVille Syrjälä2014-01-201-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Using s64 for the timestamping constants is wasteful. Signed 32bit integers get us a range of over +-2 seconds. Presuming that no-one wants to a vrefresh rate less than 0.5, we can switch to using int for the timestamping constants. We save a few bytes in drm_crtc and avoid a bunch of 64bit math. Reviewed-by: mario.kleiner.de@gmail.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
* | drm/edid: Populate picture aspect ratio for CEA modesVandana Kannan2014-01-201-0/+2
|/ | | | | | | | | | | | | Adding picture aspect ratio for CEA modes based on CEA-861D Table 3 or CEA-861E Table 4. This is useful for filling up the detail in AVI infoframe. v2: Ville's review comments incorporated Added picture aspect ratio as part of edid_cea_modes instead of DRM_MODE Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: add drm_set_preferred_modeGerd Hoffmann2013-11-061-0/+2
| | | | | | | | | New helper function to set the preferred video mode. Can be called after drm_add_modes_noedid if you don't want the largest supported video mode be used by default. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-tda998x-3.12' of ↵Dave Airlie2013-10-221-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-next This adds support for the Armada 510 display subsystem found on the Marvell Dove devices. This IP is re-used across several different Marvell SoCs with various tweaks, and this driver has been structured to allow the other IPs to re-use the bulk of this code; further work in this area is expected from interested parties. This has been extensively tested on the SolidRun Cubox platform and appears to work well there. [airlied: update for api changes merged previous to this]
| * DRM: Armada: Add Armada DRM driverRussell King2013-10-121-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the pair of LCD controllers on the Marvell Armada 510 SoCs. This driver supports: - multiple contiguous scanout buffers for video and graphics - shm backed cacheable buffer objects for X pixmaps for Vivante GPU acceleration - dual lcd0 and lcd1 crt operation - video overlay on each LCD crt via DRM planes - page flipping of the main scanout buffers - DRM prime for buffer export/import This driver is trivial to extend to other Armada SoCs. Included in this commit is the core driver with no output support; output support is platform and encoder driver dependent. Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | drm/sysfs: sort out minor and connector device object lifetimes.Dave Airlie2013-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So drm was abusing device lifetimes, by having embedded device structures in the minor and connector it meant that the lifetime of the internal drm objects (drm_minor and drm_connector) were tied to the lifetime of the device files in sysfs, so if something kept those files opened the current code would kfree the objects and things would go downhill from there. Now in reality there is no need for these lifetimes to be so intertwined, especailly with hotplugging of devices where we wish to remove the sysfs and userspace facing pieces before we can unwind the internal objects due to open userspace files or mmaps, so split the objects out so the struct device is no longer embedded and do what fbdev does and just allocate and remove the sysfs inodes separately. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge remote-tracking branch 'airlied/drm-next' into drm-intel-nextDaniel Vetter2013-10-101-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conflict in intel_drv.h tripped me up a bit since a patch in dinq moves all the functions around, but another one in drm-next removes a single function. So I'ev figured backing this into a backmerge would be good. i915_dma.c is just adjacent lines changed, nothing nefarious there. Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/intel_drv.h Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/edid: add drm_edid_duplicateJani Nikula2013-10-011-0/+1
| |/ | | | | | | | | | | | | We have some code duplication related to EDID duplication. Add a helper. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: Reject stereo modes with an unknown layoutDamien Lespiau2013-10-011-0/+2
| | | | | | | | | | | | | | | | The kernel shouldn't accept invalid modes, just say No. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Code stereo layouts as an enum rather than a bit fieldDamien Lespiau2013-10-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to use fewer bits in the mode structure, leaving room for future work while allowing more stereo layouts types than we could have ever dreamt of. I also exposed the previously private DRM_MODE_FLAG_3D_MASK to set in stone that we are using 5 bits for the stereo layout enum, reserving 32 values. Even with that reservation, we gain 3 bits from the previous encoding. The code adding the mandatory stereo modes needeed to be adapted as it was relying or being able to or stereo layouts together. Suggested-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Implement timings adjustments for frame packingDamien Lespiau2013-10-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Introduce a crtc_clock for struct drm_display_modeDamien Lespiau2013-10-011-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ä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Remove synth_clock from struct drm_display_modeDamien Lespiau2013-10-011-1/+0
| | | | | | | | | | | | | | | | | | This field is unused. Garbage collect it. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Remove clock_index from struct drm_display_modeDamien Lespiau2013-10-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | This field was only accessed by the nouveau driver, but never set. So concluded we can rid of this one. Acked-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Make exposing stereo modes a per-connector opt-inDamien Lespiau2013-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Just like with interlaced or double scan modes, make stereo modes a per-connector opt-in to give a chance to driver authors to make it work before enabling it. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modesDamien Lespiau2013-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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ä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm: Add HDMI stereo 3D flags to struct drm_mode_modeinfoDamien Lespiau2013-10-011-0/+14
|/ | | | | | | | | | | | | | HDMI 1.4a defines a few layouts that we'd like to expose. This commits add new modeinfo flags that can be used to list the supported stereo layouts (when querying the list of modes) and to set a given stereo 3D mode (when setting a mode). v2: Add a drm_mode_is_stereo() helper Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: Add drm_bridgeSean Paul2013-09-021-0/+55
| | | | | | | | | | | | | This patch adds the notion of a drm_bridge. A bridge is a chained device which hangs off an encoder. The drm driver using the bridge should provide the association between encoder and bridge. Once a bridge is associated with an encoder, it will participate in mode set, and dpms (via the enable/disable hooks). Signed-off-by: Sean Paul <seanpaul@chromium.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Advertise async page flip ability through GETCAP ioctlKeith Packard2013-08-301-0/+3
| | | | | | | | Let applications know whether the kernel supports asynchronous page flipping. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm: Pass page flip ioctl flags to driverKeith Packard2013-08-301-1/+2
| | | | | | | | | This lets drivers see the flags requested by the application [airlied: fixup for rcar/imx/msm] Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm: Remove the dithering_mode_property fieldDamien Lespiau2013-08-301-1/+0
| | | | | | | | | | | | | | | | Unfortunately, I haven't been thorough enough in: commit ddecb10cf402a8325579f298fd4986a90f33496b Author: Lespiau, Damien <damien.lespiau@intel.com> Date: Tue Aug 20 00:53:04 2013 +0100 drm: Remove drm_mode_create_dithering_property() And forgot to remove the dithering_mode_property member of struct drm_mode_config. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm: Don't export drm_find_cea_extension() any moreLespiau, Damien2013-08-301-1/+0
| | | | | | | | | This function is only used inside drm_edid.c. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm: Remove 2 unused definesLespiau, Damien2013-08-211-2/+0
| | | | | | | | | | | | | | | | | | These were introduced in the very first DRM commit: commit f453ba0460742ad027ae0c4c7d61e62817b3e7ef Author: Dave Airlie <airlied@redhat.com> Date: Fri Nov 7 14:05:41 2008 -0800 DRM: add mode setting support Add mode setting support to the DRM layer. But are unused. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Make drm_mode_remove() staticLespiau, Damien2013-08-211-1/+0
| | | | | | | | It's only used in drm_crtc.c. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Remove drm_mode_list_concat()Lespiau, Damien2013-08-211-2/+0
| | | | | | | | | | | | | | | | | The last user was removed in commit 575dc34ee0de867ba83abf25998e0963bff451fa Author: Dave Airlie <airlied@redhat.com> 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 <damien.lespiau@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Remove drm_mode_create_dithering_property()Lespiau, Damien2013-08-211-1/+0
| | | | | | | | | | | | | | | This was last used by nouveau, replaced by a driver-specific property in: commit de69185573586302ada2e59ba41835df36986277 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Oct 17 12:23:41 2011 +1000 drm/nouveau: improve dithering properties, and implement proper auto mode Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Remove stale prototypesLespiau, Damien2013-08-211-11/+0
| | | | | | | | | A few prototypes have been left in the headers, their function friends long gone. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: use ida to allocate connector idsIlia Mirkin2013-08-191-0/+2
| | | | | | | | | | This makes it so that reloading a module does not cause all the connector ids to change, which are user-visible and sometimes used for configuration. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Remove drm_mode_validate_clocksStéphane Marchesin2013-08-191-3/+0
| | | | | | | | This function is unused. Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Revert "drm: kms_helper: don't lose hotplug event"Dave Airlie2013-06-281-1/+0
| | | | | | | | | | | | | | | | | | This reverts commit 160954b7bca43da7cd3cfbce310e6df919a8216e. This was rearming the workqueue with a 0 timeout, causing a WARN_ON, and possible loop. Daniel writes: "I've looked a bit into this and I think we need to have a separate work struct for recovering these lost hotplug events since the continuous self-rearming case is a real risk (e.g. if a connector flip-flops all the time). At least I don't see a sane way to block out re-arming with the current code in a simple way. So reverting the offender seems like the right thing and I'll go back to the drawing board for 3.12." Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: add hotspot support for cursors.Dave Airlie2013-06-281-0/+5
| | | | | | | | | | | | | | | So it looks like for virtual hw cursors on QXL we need to inform the "hw" device what the cursor hotspot parameters are. This makes sense if you think the host has to draw the cursor and interpret clicks from it. However the current modesetting interface doesn't support passing the hotspot information from userspace. This implements a new cursor ioctl, that takes the hotspot info as well, userspace can try calling the new interface and if it gets -ENOSYS it means its on an older kernel and can just fallback. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: kms_helper: don't lose hotplug eventDaniel Vetter2013-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | There's a race window (small for hpd, 10s large for polled outputs) where userspace could sneak in with an unrelated connnector probe ioctl call and eat the hotplug event (since neither the hpd nor the poll code see a state change). To avoid this, check whether the connector state changes in all other ->detect calls (in the current helper code that's only probe_single) and if that's the case, fire off a hotplug event. Note that we can't directly call the hotplug event handler, since that expects that no locks are held (due to reentrancy with the fb code to update the kms console). Also, this requires that drivers using the probe_single helper function set up the poll work. All current drivers do that already, and with the reworked hpd handling there'll be no downside to unconditionally setting up the poll work any more. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fix fb leak in setcrtcDaniel Vetter2013-06-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drivers are allowed (actually have to) disable unrelated crtcs in their ->set_config callback (when we steal all the connectors from that crtc). If they do that they'll clear crtc->fb to NULL. Which results in a refcount leak, since the drm core is keeping track of that reference. To fix this track the old fb of all crtcs and adjust references for all of them. Of course, since we only hold an additional reference for the fb for the current crtc we need to increase refcounts before we drop the old one. This approach has the benefit that it inches us a bit closer to an atomic modeset world, where we want to update the config of all crtcs in one step. This regression has been introduce in the framebuffer refcount conversion, specifically in commit b0d1232589df5575c5971224ac4cb30e7e525884 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Dec 11 01:07:12 2012 +0100 drm: refcounting for crtc framebuffers Reported-by: Russell King <linux@arm.linux.org.uk> Cc: Russell King <linux@arm.linux.org.uk> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Remove some unused stuff from drm_planeVille Syrjälä2013-06-171-11/+0
| | | | | | | | | | | | There's a bunch of unused members inside drm_plane, bloating the size of the structure needlessly. Eliminate them. v2: Remove all of it from kernel-doc too Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm: Add drm_plane_force_disable()Ville Syrjälä2013-06-171-0/+1
| | | | | | | | | | | | | | | | | drm_plane_force_disable() will forcibly disable the plane even if user had previously requested the plane to be enabled. This can be used to force planes to be off when restoring the fbdev mode. The code was simply pulled from drm_framebuffer_remove(), which now calls the new function as well. v2: Check plane->fb in drm_plane_force_disable(), drop bogus comment about disabling crtc Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm: Constify the pretty-print functionsVille Syrjälä2013-06-111-8/+9
| | | | | | | | | | | | | The structures and strings involved with various pretty-print functions aren't meant to be modified, so make them all const. The exception is drm_connector_enum_list which does get modified in drm_connector_init(). While at it move the drm_get_connector_status_name() prototype from drmP.h to drm_crtc.h where it belongs. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Print pretty names for pixel formatsVille Syrjälä2013-06-111-0/+1
| | | | | | | | | | | | | | | | | | | Rather than just printing the pixel format as a hex number, decode the fourcc into human readable form, and also decode the LE vs. BE flag. Keep printing the raw hex number too in case it contains non-printable characters. Some examples what the new drm_get_format_name() produces: DRM_FORMAT_XRGB8888: "XR24 little-endian (0x34325258)" DRM_FORMAT_YUYV: "YUYV little-endian (0x56595559)" DRM_FORMAT_RGB565|DRM_FORMAT_BIG_ENDIAN: "RG16 big-endian (0xb6314752)" Unprintable characters: "D??? big-endian (0xff7f0244)" v2: Fix patch author Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Kill user_modes list and the associated ioctlsVille Syrjälä2013-04-301-15/+0
| | | | | | | | | | | | | | | | | | There is no way to use modes added to the user_modes list. We never look at the contents of said list in the kernel, and the only operations userspace can do are attach and detach. So the only "benefit" of this interface is wasting kernel memory. Fortunately it seems no real user space application ever used these ioctls. So just kill them. Also remove the prototypes for the non-existing drm_mode_addmode_ioctl() and drm_mode_rmmode_ioctl() functions. v2: Use drm_noop instead of completely removing the ioctls Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Silence some sparse warningsVille Syrjälä2013-04-301-0/+3
| | | | | | | | | | | | | | drivers/gpu/drm/drm_pci.c:155:5: warning: symbol 'drm_pci_set_busid' was not declared. Should it be static? drivers/gpu/drm/drm_pci.c:197:5: warning: symbol 'drm_pci_set_unique' was not declared. Should it be static? drivers/gpu/drm/drm_pci.c:269:5: warning: symbol 'drm_pci_agp_init' was not declared. Should it be static? drivers/gpu/drm/drm_crtc.c:181:1: warning: symbol 'drm_get_dirty_info_name' was not declared. Should it be static? drivers/gpu/drm/drm_crtc.c:1123:5: warning: symbol 'drm_mode_group_init' was not declared. Should it be static? drivers/gpu/drm/drm_modes.c:918:6: warning: symbol 'drm_mode_validate_clocks' was not declared. Should it be static? Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Add drm_mode_equal_no_clocks()Ville Syrjälä2013-04-261-0/+1
| | | | | | | | | | | | | 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 <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Remove explicit vrefresh initialization from DRM_MODE()Ville Syrjälä2013-04-261-1/+1
| | | | | | | | | | | No need to zero initialize .vrefresh in DRM_MODE() since it's using desgignated initializers. This will also avoid some duplicate initialization warnings later. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Misc comment cleanupChristopher Harvey2013-04-121-1/+1
| | | | | Signed-off-by: Christopher Harvey <charvey@matrox.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Documentation typo fixesChristopher Harvey2013-03-081-3/+3
| | | | | Signed-off-by: Christopher Harvey <charvey@matrox.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Add some missing forward declarationsThierry Reding2013-02-221-1/+2
| | | | | | | | | The drm_file and drm_clip_rect structures are used throughout the file but they are never declared nor pulled in through an include. Add forward declarations to make them available. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm: Remove duplicate drm_mode_cea_vic()Thierry Reding2013-02-221-2/+1
| | | | | | | | | The same function had already been merged with a different name. Remove the duplicate one but reuse some of its kerneldoc fragments for the existing implementation. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud