summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* vmwgfx: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer2011-12-071-2/+2
| | | | | | | | | | | | | The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: fix infinite recursion on unbind due to ilk vt-d w/aDaniel Vetter2011-12-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The recursion loop goes retire_requests->unbind->gpu_idle->retire_reqeusts. Every time we go through this we need a - active object that can be retired - and there are no other references to that object than the one from the active list, so that it gets unbound and freed immediately. Otherwise the recursion stops. So the recursion is only limited by the number of objects that fit these requirements sitting in the active list any time retire_request is called. Issue exercised by tests/gem_unref_active_buffers from i-g-t. There's been a decent bikeshed discussion whether it wouldn't be better to pass around a flag, but imo this is o.k. for such a limited case that only supports a w/a. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42180 Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Chris Wilson <chris@chris-wilson> [ickle- we built better bikesheds, but this keeps the rain off for now] Tested-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_idAlex Deucher2011-12-071-4/+3
| | | | | | | | | Seems like something got mis-merged here. Noticed by kallisti5 on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vmwgfx: integer overflow in vmw_kms_update_layout_ioctl()Xi Wang2011-12-021-5/+6
| | | | | | | | | | | | | There are two issues in vmw_kms_update_layout_ioctl(). First, the for loop forgets to index rects and only checks the first element. Second, there is a potential integer overflow if userspace passes in a large arg->num_outputs. The call to kzalloc() would allocate a small buffer, leading to out-of-bounds read. Reported-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix 2D tiling CS support on EG/CMAlex Deucher2011-12-022-26/+154
| | | | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43191 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix scanout of 2D tiled buffers on EG/CMAlex Deucher2011-12-022-2/+62
| | | | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43191 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Fix lack of CRTC disable for drm_crtc_helper_set_config(.fb=NULL)Chris Wilson2011-12-021-2/+25
| | | | | | | | | | | | | | | | | | | Disabling the CRTC by setting its framebuffer to NULL, as used by drm_framebuffer_cleanup(), was failing to pass the current framebuffer to the crtc_func->disable callback. This is because of the dance within drm_crtc_helper_set_config to pass the new_fb (NULL in this case) to the drm_crtc_helper_set_mode with the currently attached fb as a parameter. drm_crtc_helper_set_mode treats this as a no-op and the encoder is still enabled. And so the current fb is forgotten before the call to drm_helper_disable_unused_functions. This patch treats disabling the CRTC as a simple special case rather than adding further complexity into the configuration logic. This fixes a pin-leak of the fb bo on Xserver close. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Skip ACPI call to ATIF when possibleJean Delvare2011-12-011-4/+4
| | | | | | | | | | I am under the impression that it only makes sense to call the ATIF method if the graphics device has an ACPI handle attached. So we could skip the call altogether if there is no such handle. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Hide debugging messageJean Delvare2011-12-011-1/+2
| | | | | | | | | | | | Use the proper macro to issue the debugging message in radeon_atif_call(). Otherwise we spam the log of many systems with a message which looks like an error message of unknown origin, and could thus confuse the user. Commit dc77de12dde95c8da39e4c417eb70c7d445cf84b was a first step in this direction, but was not sufficient IMHO. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add some loop timeouts in pageflip codeAlex Deucher2011-12-014-4/+24
| | | | | | | | | | | | | | Avoid infinite loops waiting for surface updates if a GPU reset happens while waiting for a page flip. See: https://bugs.freedesktop.org/show_bug.cgi?id=43191 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Tested-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-nouveau-fixes' of ↵Dave Airlie2011-12-018-4/+64
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nv50/disp: silence compiler warning drm/nouveau: fix oopses caused by clear being called on unpopulated ttms drm/nouveau: Keep RAMIN heap within the channel. drm/nvd0/disp: fix sor dpms typo, preventing dpms on in some situations drm/nvc0/gr: fix TP init for transform feedback offset queries drm/nouveau: add dumb ioctl support
| * drm/nv50/disp: silence compiler warningBen Skeggs2011-11-301-2/+2
| | | | | | | | | | | | | | NFI why this only started appearing now. The use of the uninitialised var can't actually happen, so perhaps my compiler just got stupider. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: fix oopses caused by clear being called on unpopulated ttmsBen Skeggs2011-11-301-0/+3
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: Keep RAMIN heap within the channel.Younes Manton2011-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | The entire RAMIN is allocated to be 'size', but the heap is specified as 'base' + 'size' inside RAMIN, so it will overflow past RAMIN by 'base' bytes on NV50+ and clobber other allocatons unless it's size is adjusted. Signed-off-by: Younes Manton <younes.m@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvd0/disp: fix sor dpms typo, preventing dpms on in some situationsBen Skeggs2011-11-301-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvc0/gr: fix TP init for transform feedback offset queriesChristoph Bumiller2011-11-301-0/+2
| | | | | | | | | | | | | | | | | | Without this, they return bytes written since the last update of the offset, but we want the full offset. Trace shows setting this on GPC[0]/TP[0] is enough. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: add dumb ioctl supportBen Skeggs2011-11-303-0/+55
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge branch 'exynos-drm' of ↵Dave Airlie2011-11-2814-226/+436
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes * 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung: drm/exynos: fixed wrong err ptr usage and destroy call in exeception drm/exynos: Add disable of manager drm/exynos: include linux/module.h drm/exynos: fix vblank bug. drm/exynos: changed buffer structure. drm/exynos: removed unnecessary variable. drm/exynos: use gem create function generically drm/exynos: checked for null pointer drm/exynos: added crtc dpms for disable crtc drm/exynos: removed meaningless parameter from fbdev update drm/exynos: restored kernel_fb_list when reiniting fb_helper drm/exynos: changed exynos_drm_display to exynos_drm_display_ops drm/exynos: added manager object to connector drm/exynos: fixed converting between display mode and timing drm/exynos: fixed connector flag with hpd and interlace scan for hdmi drm/exynos: added kms poll for handling hpd event
| * drm/exynos: fixed wrong err ptr usage and destroy call in execeptionSeung-Woo Kim2011-11-171-10/+5
| | | | | | | | | | | | | | | | | | - exynos_drm_buf_create() returns err pointer so NULL check is wrong. - Case that exynos_gem_obj is not created, destroy call in exception handle lable uses this pointer. so instead buffer is directly used. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Add disable of managerJoonyoung Shim2011-11-173-26/+55
| | | | | | | | | | Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: include linux/module.hInki Dae2011-11-151-0/+1
| | | | | | | | | | Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: fix vblank bug.Inki Dae2011-11-151-10/+36
| | | | | | | | | | | | | | | | | | In case that vblank_disable_allowed is 1, the problem that manager->pipe could be -1 at vsync interrupt handler could be induced so this patch fixes that. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: changed buffer structure.Inki Dae2011-11-1510-133/+148
| | | | | | | | | | | | | | | | | | the purpose of this patch is to consider IOMMU support in the future. EXYNOS4 SoC supports IOMMU also so the address for DMA could be physical address with IOMMU or device address with IOMMU. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: removed unnecessary variable.Inki Dae2011-11-151-2/+0
| | | | | | | | | | Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: use gem create function genericallyInki Dae2011-11-153-36/+55
| | | | | | | | | | | | | | | | | | | | this patch addes exynos_drm_gem_init() creating and initialzing a gem. allocation functions could use this function to create new gem and it changes size type of exynos_drm_gem_create structure to 64bit and also corrects comments to exynos_drm_gem_create structure. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: checked for null pointerSeung-Woo Kim2011-11-151-2/+4
| | | | | | | | | | | | Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: added crtc dpms for disable crtcJoonyoung Shim2011-11-153-11/+73
| | | | | | | | | | | | | | | | | | | | | | crtc dpms is called as destroying attached fb so dpms off sould be processed. crtc dpms also can be called after crtc is detached from encoder so pipe value of manager is used to find display controller for this case Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: removed meaningless parameter from fbdev updateSeung-Woo Kim2011-11-151-9/+5
| | | | | | | | | | | | | | | | | | drm_framebuffer already has width and height so they are meaningless as parameters when updating fb_info. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: restored kernel_fb_list when reiniting fb_helperJoonyoung Shim2011-11-151-0/+15
| | | | | | | | | | | | | | | | | | | | during recreating exynos_drm_fbdev as a new display device probes, fb_helper is reinitialized but kernel fb is not changed so kernel_fb_list should be restored after fb_helper is reinitialized. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: changed exynos_drm_display to exynos_drm_display_opsInki Dae2011-11-154-22/+23
| | | | | | | | | | | | | | | | exynos_drm_display has function pointes so exynos_drm_display_ops is better to describe. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: added manager object to connectorInki Dae2011-11-152-8/+33
| | | | | | | | | | | | | | | | | | connector contains some contents for display controller so the connector also should be able to access controller through manager. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: fixed converting between display mode and timingSeung-Woo Kim2011-11-151-1/+8
| | | | | | | | | | | | | | | | | | missing members are added into converting function between timing and display mode and refresh rate of display mode is calculated by drm mode function. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: fixed connector flag with hpd and interlace scan for hdmiSeung-Woo Kim2011-11-151-0/+2
| | | | | | | | | | | | | | | | hdmi display in exynos supports hotplug event and interlace scan mode Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: added kms poll for handling hpd eventSeung-Woo Kim2011-11-152-0/+17
| | | | | | | | | | | | | | | | this patch adds kms poll infrastructure to handle hotplug detection event Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2011-11-2320-432/+594
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits) drm: integer overflow in drm_mode_dirtyfb_ioctl() drivers/gpu/vga/vgaarb.c: add missing kfree drm/radeon/kms/atom: unify i2c gpio table handling drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real ttm: Don't return the bo reserved on error path drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS drm/i915: Fix inconsistent backlight level during disabled drm, i915: Fix memory leak in i915_gem_busy_ioctl(). drm/i915: Use DPCD value for max DP lanes. drm/i915: Initiate DP link training only on the lanes we'll be using drm/i915: Remove trailing white space drm/i915: Try harder during dp pattern 1 link training drm/i915: Make DP prepare/commit consistent with DP dpms drm/i915: Let panel power sequencing hardware do its job drm/i915: Treat PCH eDP like DP in most places drm/i915: Remove link_status field from intel_dp structure drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control drm/i915: Module parameters using '-1' as default must be signed type drm/i915: Turn on another required clock gating bit on gen6. drm/i915: Turn on a required 3D clock gating bit on Sandybridge. ...
| * | drm: integer overflow in drm_mode_dirtyfb_ioctl()Xi Wang2011-11-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drivers/gpu/vga/vgaarb.c: add missing kfreeJulia Lawall2011-11-221-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kbuf is a buffer that is local to this function, so all of the error paths leaving the function should release it. Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms/atom: unify i2c gpio table handlingAlex Deucher2011-11-221-128/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the quirks and i2c_rec assignment into separate functions used by both radeon_lookup_i2c_gpio() and radeon_atombios_i2c_init(). This avoids duplicating code and cases where quirks were only added to one of the functions. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: fix up gpio i2c mask bits for r4xx for realAlex Deucher2011-11-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes i2c test failures when i2c_algo_bit.bit_test=1. The hw doesn't actually require a mask, so just set it to the default mask bits for r1xx-r4xx radeon ddc. I missed this part the first time through. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | ttm: Don't return the bo reserved on error pathThomas Hellstrom2011-11-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | An unlikely race could case a bo to be returned reserved on an error path. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux ↵Dave Airlie2011-11-2210-211/+354
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-fixes * 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux: (25 commits) drm/i915: Fix inconsistent backlight level during disabled drm, i915: Fix memory leak in i915_gem_busy_ioctl(). drm/i915: Use DPCD value for max DP lanes. drm/i915: Initiate DP link training only on the lanes we'll be using drm/i915: Remove trailing white space drm/i915: Try harder during dp pattern 1 link training drm/i915: Make DP prepare/commit consistent with DP dpms drm/i915: Let panel power sequencing hardware do its job drm/i915: Treat PCH eDP like DP in most places drm/i915: Remove link_status field from intel_dp structure drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control drm/i915: Module parameters using '-1' as default must be signed type drm/i915: Turn on another required clock gating bit on gen6. drm/i915: Turn on a required 3D clock gating bit on Sandybridge. drm/i915: enable cacheable objects on Ivybridge drm/i915: add constants to size fence arrays and fields drm/i915: Ivybridge still has fences! drm/i915: forcewake warning fixes in debugfs drm/i915: Fix object refcount leak on mmappable size limit error path. drm/i915: Use mode_config.mutex in ironlake_panel_vdd_work ...
| | * | drm/i915: Fix inconsistent backlight level during disabledTakashi Iwai2011-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the brightness property is inquired while the backlight is disabled, the driver returns a wrong value (zero) because it probes the value after the backlight was turned off. This caused a black screen even after the backlight is enabled again. It should return the internal backlight_level instead, so that it won't be influenced by the backlight-enable state. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=41926 BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652 Tested-by: Kamal Mostafa <kamal@canonical.com> Cc: Alex Davis <alex14641@yahoo.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Keith Packard <keithp@keithp.com>
| | * | drm, i915: Fix memory leak in i915_gem_busy_ioctl().Rakib Mullick2011-11-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A call to i915_add_request() has been made in function i915_gem_busy_ioctl(). i915_add_request can fail, so in it's exit path previously allocated memory needs to be freed. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
| | * | drm/i915: Use DPCD value for max DP lanes.Keith Packard2011-11-161-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BIOS VBT value for an eDP panel has been shown to be incorrect on one machine, and we haven't found any machines where the DPCD value was wrong, so we'll use the DPCD value everywhere. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * | drm/i915: Initiate DP link training only on the lanes we'll be usingKeith Packard2011-11-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit the link training setting command to the lanes needed for the current mode. It seems vaguely possible that a monitor will try to train the other lanes and fail in some way, so this seems like the safer plan. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * | drm/i915: Remove trailing white spaceKeith Packard2011-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Found a couple of bare tabs in intel_dp.c Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * | drm/i915: Try harder during dp pattern 1 link trainingKeith Packard2011-11-161-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of going through the sequence just once, run through the whole set up to 5 times to see if something can work. This isn't part of the DP spec, but the BIOS seems to do it, and given that link training failure is so bad, it seems reasonable to follow suit. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * | drm/i915: Make DP prepare/commit consistent with DP dpmsKeith Packard2011-11-161-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the sequence of operations in all three functions makes sense: 1) The backlight must be off unless the screen is running 2) The link must be running to turn the eDP panel on/off 3) The CPU eDP PLL must be running until everything is off Signed-off-by: Keith Packard <keithp@keithp.com>
| | * | drm/i915: Let panel power sequencing hardware do its jobKeith Packard2011-11-162-69/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The panel power sequencing hardware tracks the stages of panel power sequencing and signals when the panel is completely on or off. Instead of blindly assuming the panel timings will work, poll the panel power status register until it shows the correct values. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * | drm/i915: Treat PCH eDP like DP in most placesKeith Packard2011-11-162-34/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCH eDP has many of the same needs as regular PCH DP connections, including the DP_CTl bit settings, the TRANS_DP_CTL register. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>