summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
Commit message (Collapse)AuthorAgeFilesLines
* drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.hDaniel Vetter2014-11-051-0/+1
| | | | | | | | | | | | | | | | | | | Just a bit of OCD cleanup on headers - this function isn't the core interface any more but just a helper for drivers who haven't yet transitioned to universal planes. Put the declaration at the right spot and sprinkle necessary #includes over all drivers. Maybe this helps to encourage driver maintainers to do the switch. v2: Fix #include ordering for tegra, reported by 0-day builder. v3: Include required headers, reported by Thierry. Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Thierry Reding <treding@nvidia.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* drm: add register and unregister functions for connectorsThomas Wood2014-06-191-1/+1
| | | | | | | | | | Introduce generic functions to register and unregister connectors. This provides a common place to add and remove associated user space interfaces. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: Replace crtc fb with primary plane fb (v3)Matt Roper2014-04-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that CRTC's have a primary plane, there's no need to track the framebuffer in the CRTC. Replace all references to the CRTC fb with the primary plane's fb. This patch was generated by the Coccinelle semantic patching tool using the following rules: @@ struct drm_crtc C; @@ - (C).fb + C.primary->fb @@ struct drm_crtc *C; @@ - (C)->fb + C->primary->fb v3: Generate patch via coccinelle. Actual removal of crtc->fb has been moved to a subsequent patch. v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* drm/vmwgfx: Add our connectors to sysfsThomas Hellstrom2013-12-041-0/+2
| | | | | | | Some user-space apps expects to find them there. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* drm/vmwgfx: Correctly set the enabled state on crtcsThomas Hellstrom2013-12-041-0/+2
| | | | | | | | Failure to do this would make the drm_mode_get_crtc ioctl return without crtc mode info, indicating that no mode was set. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* drm/vmwgfx: drm_connector_property -> drm_object_propertyRob Clark2012-11-301-1/+1
| | | | Signed-off-by: Rob Clark <rob@ti.com>
* vmwgfx: Pick up the initial size from the width and height regsJakob Bornecrantz2012-02-131-2/+2
| | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge remote-tracking branch 'pfdo/drm-fixes' into drm-core-nextDave Airlie2011-12-211-1/+21
|\ | | | | | | | | | | | | | | -next reported a messy merge, so I've merged my upstream pull into my -next tree. Conflicts: drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
| * vmwgfx: Resend the cursor after legacy modesetJakob Bornecrantz2011-12-191-1/+21
| | | | | | | | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: Replace pitch with pitches[] in drm_framebufferVille Syrjälä2011-12-201-2/+2
|/ | | | | | | | | | Otherwise each driver would need to keep the information inside their own framebuffer object structure. Also add offsets[]. BOs on the other hand are driver specific, so those can be kept in driver specific structures. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Infrastructure for explicit placementThomas Hellstrom2011-11-071-0/+1
| | | | | | | | | | Make it possible to use explicit placement (although not hooked up with a user-space interface yet) and relax the single framebuffer limit to only apply to implicit placement. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Use "Virtual" connectors and encoders rather than "LVDS".Thomas Hellstrom2011-11-011-2/+2
| | | | | | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Whitespace & code style in display unitJakob Bornecrantz2011-10-181-3/+1
| | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Fix display system init & close functionsJakob Bornecrantz2011-10-181-8/+22
| | | | | | | | | | Make sure we null the display private, make sure we catch and handle vblank failing to init and don't call vblank_cleanup if we haven't initialized the display system. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Add screen object supportJakob Bornecrantz2011-10-051-3/+2
| | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Refactor common display unit functions to shared fileJakob Bornecrantz2011-10-051-253/+15
| | | | | | | | More preparation for Screen Object support. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Print error diagnostics if depth doesn't match the host expectationMichel Dänzer2011-09-011-10/+4
| | | | | | Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Add support for depth 8Michel Dänzer2011-09-011-0/+11
| | | | | | Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Let SVGA_REG_NUM_DISPLAYS determine output connectivityThomas Hellstrom2011-09-011-3/+10
| | | | | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Mark constant arrays of drm_display_mode constChris Wilson2011-02-231-2/+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 <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drivers/gpu/drm/vmwgfx: Fix k.alloc switched argumentsJoe Perches2010-11-091-1/+1
| | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Prune modes based on available VRAM sizeThomas Hellstrom2010-10-061-9/+19
| | | | | | | | | | This needs to be reviewed once we support screen objects and don't rely on VRAM for the frame-buffer. Also fix some integer overflow issues pointed out by Michel Daenzer. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: Enable use of the vblank systemThomas Hellstrom2010-10-011-10/+17
| | | | | | | | | This is to avoid accessing uninitialized data during drm_irq_uninstall and vblank ioctls. At the same time, enable error check from drm_kms_init which previously appeared to ignore all errors. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Use a nondestructive mode for output detect when polling (v2)Chris Wilson2010-09-141-3/+3
| | | | | | | | | | | | v2: Julien Cristau pointed out that @nondestructive results in double-negatives and confusion when trying to interpret the parameter, so use @force instead. Much easier to type as well. ;-) And fix the miscompilation of vmgfx reported by Sedat Dilek. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Use a nondestructive mode for output detect when pollingChris Wilson2010-09-131-1/+2
| | | | | | | | | | | | | | | Destructive load-detection is very expensive and due to failings elsewhere can trigger system wide stalls of up to 600ms. A simple first step to correcting this is not to invoke such an expensive and destructive load-detection operation automatically. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29536 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16265 Reported-by: Bruno Prémont <bonbons@linux-vserver.org> Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: expand gamma_setJames Simmons2010-08-101-1/+1
| | | | | | | | | | Expand the crtc_gamma_set function to accept a starting offset. The reason for this is to eventually use this function for setcolreg from drm_fb_helper.c. The fbdev colormap function can start at any offset in the color map. Signed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Allow userspace to change default layout. Bump minor.Jakob Bornecrantz2010-06-031-6/+77
| | | | | | | | | | | | | The host may change the layout and, since the change is communicated to the master, the master needs a way to communicate the change to the kernel driver. The minor version number is bumped to advertize the availability of this feature. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Some modesetting cleanups and fixes.Jakob Bornecrantz2010-06-011-13/+4
| | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Don't use SVGA_REG_ENABLE in modesetting code.Jakob Bornecrantz2010-06-011-5/+0
| | | | | | | | | We should not use SVGA_REG_ENABLE anywhere but in the fifo setup code, since it controls whether the device is active. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Remove duplicate member from struct vmw_legacy_display_unit.Jakob Bornecrantz2010-06-011-4/+2
| | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Support older hardware.Jakob Bornecrantz2010-06-011-13/+57
| | | | | | | | V2: Fix a couple of typos. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Get connector status from detection function.Jakob Bornecrantz2010-06-011-7/+3
| | | | | | | | | | Also make sure the ldu::active member is properly initialized. Part of fix by Michel Daenzer <daenzer@vmware.com>. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Michel Daenzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Make sure to unpin old and pin new framebuffer.Jakob Bornecrantz2010-06-011-6/+11
| | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Fix single framebuffer detection.Jakob Bornecrantz2010-06-011-0/+3
| | | | | | | | V2: Fix a typo. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Add DRM driver for VMware Virtual GPUJakob Bornecrantz2009-12-151-0/+516
This commit adds the vmwgfx driver for the VWware Virtual GPU aka SVGA. The driver is under staging the same as Nouveau and Radeon KMS. Hopefully the 2D ioctls are bug free and don't need changing, so that part of the API should be stable. But there there is a pretty big chance that the 3D API will change in the future. Signed-off-by: Thomas Hellström <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud