Dave Airlie [Fri, 3 May 2013 00:09:11 +0000 (10:09 +1000)]
Merge branch 'drm-next-3.10-2' of git://people.freedesktop.org/~agd5f/linux into drm-next
Just some fixes that have accumulated over the last couple of
weeks and some new PCI ids.
* 'drm-next-3.10-2' of git://people.freedesktop.org/~agd5f/linux:
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()
Dave Airlie [Thu, 2 May 2013 20:40:37 +0000 (06:40 +1000)]
drm/nouveau: fix build with nv50->nvc0
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Wed, 1 May 2013 18:34:54 +0000 (14:34 -0400)]
drm/radeon: fix handling of v6 power tables
The code was mis-handling variable sized arrays.
Reported-by: Sylvain BERTRAND <sylware@legeek.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Alex Deucher [Mon, 29 Apr 2013 14:51:26 +0000 (10:51 -0400)]
drm/radeon: clarify family checks in pm table parsing
We actually care about the chip family rather than the
DCE version although functionally they are the same.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König [Mon, 29 Apr 2013 09:55:02 +0000 (11:55 +0200)]
drm/radeon: consolidate UVD clock programming
Instead of duplicating the code over and over again, just use a single
function to handle the clock calculations.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König [Mon, 29 Apr 2013 08:20:23 +0000 (10:20 +0200)]
drm/radeon: fix UPLL_REF_DIV_MASK definition
Stupid copy & paste error over all generations.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jerome Glisse [Fri, 26 Apr 2013 02:29:27 +0000 (22:29 -0400)]
radeon: add bo tracking debugfs
This is to allow debugging of userspace program not freeing buffer
after, which is basicly a memory leak. This print the list of all
gem object along with their size and placement (VRAM,GTT,CPU) and
with the pid of the task that created them.
agd5f: add warning fix
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Thu, 25 Apr 2013 18:06:05 +0000 (14:06 -0400)]
drm/radeon: add new richland pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Alex Deucher [Thu, 25 Apr 2013 17:55:15 +0000 (13:55 -0400)]
drm/radeon: add some new SI PCI ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Christian König [Wed, 24 Apr 2013 12:11:09 +0000 (14:11 +0200)]
drm/radeon: fix scratch reg handling for UVD fence
Also init the scratch reg to zero on the UVD ring.
This fixes UVD on AGP based cards.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König [Thu, 25 Apr 2013 16:19:08 +0000 (18:19 +0200)]
drm/radeon: allocate SA bo in the requested domain
This avoid moving the BO directly after allocating it.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Thu, 25 Apr 2013 13:29:17 +0000 (09:29 -0400)]
drm/radeon: fix possible segfault when parsing pm tables
If we have a empty power table, bail early and allocate
the default power state.
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=63865
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Alex Deucher [Wed, 24 Apr 2013 18:39:31 +0000 (14:39 -0400)]
drm/radeon: fix endian bugs in atom_allocate_fb_scratch()
Reviwed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Dave Airlie [Thu, 2 May 2013 07:33:25 +0000 (17:33 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
Add GK110 modesetting suport.
* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
drm/nve0: recognise nvf0 as a kepler board (GK110)
drm/nouveau: force noaccel when no PFIFO support present
drm/nvf0/disp: expose display class 2.2
Ben Skeggs [Sat, 30 Mar 2013 12:21:54 +0000 (22:21 +1000)]
drm/nve0: recognise nvf0 as a kepler board (GK110)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 2 May 2013 06:20:44 +0000 (16:20 +1000)]
drm/nouveau: force noaccel when no PFIFO support present
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 30 Mar 2013 12:31:25 +0000 (22:31 +1000)]
drm/nvf0/disp: expose display class 2.2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Dave Airlie [Wed, 1 May 2013 04:23:41 +0000 (14:23 +1000)]
drm/i915: fix dmabuf vmap support
Sometimes that extra semicolon can really be hard to spot.
Acked-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Imre Deak [Wed, 24 Apr 2013 16:04:57 +0000 (19:04 +0300)]
drm/prime: warn for non-empty handle lookup list during drm file release
drm_gem_release should release all handles connected to the drm file and
so should also release the prime lookup entries of these handles. So
just WARN if this isn't the case.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 19 Apr 2013 01:01:55 +0000 (11:01 +1000)]
udl: bind the framebuffer to the correct device.
This just moves the fb sysfs node beside the drm sysfs node which
I fixed before.
just noticed it in passing.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Imre Deak [Fri, 19 Apr 2013 01:11:56 +0000 (11:11 +1000)]
drm: prime: fix refcounting on the dmabuf import error path
In commit
be8a42ae60 we inroduced a refcount problem, where on the
drm_gem_prime_fd_to_handle() error path we'll call dma_buf_put() for
self imported dma buffers.
Fix this by taking a reference on the dma buffer in the .gem_import
hook instead of assuming the caller had taken one. Besides fixing the
bug this is also more logical.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 21 Apr 2013 23:54:36 +0000 (09:54 +1000)]
drm/prime: keep a reference from the handle to exported dma-buf (v6)
Currently we have a problem with this:
1. i915: create gem object
2. i915: export gem object to prime
3. radeon: import gem object
4. close prime fd
5. radeon: unref object
6. i915: unref object
i915 has an imported object reference in its file priv, that isn't
cleaned up properly until fd close. The reference gets added at step 2,
but at step 6 we don't have enough info to clean it up.
The solution is to take a reference on the dma-buf when we export it,
and drop the reference when the gem handle goes away.
So when we export a dma_buf from a gem object, we keep track of it
with the handle, we take a reference to the dma_buf. When we close
the handle (i.e. userspace is finished with the buffer), we drop
the reference to the dma_buf, and it gets collected.
This patch isn't meant to fix any other problem or bikesheds, and it doesn't
fix any races with other scenarios.
v1.1: move export symbol line back up.
v2: okay I had to do a bit more, as the first patch showed a leak
on one of my tests, that I found using the dma-buf debugfs support,
the problem case is exporting a buffer twice with the same handle,
we'd add another export handle for it unnecessarily, however
we now fail if we try to export the same object with a different gem handle,
however I'm not sure if that is a case I want to support, and I've
gotten the code to WARN_ON if we hit something like that.
v2.1: rebase this patch, write better commit msg.
v3: cleanup error handling, track import vs export in linked list,
these two patches were separate previously, but seem to work better
like this.
v4: danvet is correct, this code is no longer useful, since the buffer
better exist, so remove it.
v5: always take a reference to the dma buf object, import or export.
(Imre Deak contributed this originally)
v6: square the circle, remove import vs export tracking now
that there is no difference
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ville Syrjälä [Fri, 26 Apr 2013 14:40:28 +0000 (17:40 +0300)]
drm: Kill user_modes list and the associated ioctls
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>
Ville Syrjälä [Thu, 25 Apr 2013 17:09:20 +0000 (20:09 +0300)]
drm: Silence some sparse warnings
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>
Ville Syrjälä [Thu, 25 Apr 2013 17:09:19 +0000 (20:09 +0300)]
drm: Make drm_ioctls const
We never modify the contents of drm_ioctls, so make it const.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
David Rientjes [Sun, 28 Apr 2013 21:09:25 +0000 (14:09 -0700)]
drivers, drm: fix qxl build error when debugfs is disabled
Fix build error when CONFIG_DEBUG_FS is disabled:
drivers/gpu/drm/qxl/qxl_debugfs.c: In function 'qxl_debugfs_init':
drivers/gpu/drm/qxl/qxl_debugfs.c:76:2: error: implicit declaration of function 'drm_debugfs_create_files'
drivers/gpu/drm/qxl/qxl_debugfs.c: In function 'qxl_debugfs_takedown':
drivers/gpu/drm/qxl/qxl_debugfs.c:84:2: error: implicit declaration of function 'drm_debugfs_remove_files'
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 29 Apr 2013 23:58:17 +0000 (09:58 +1000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-next
Just a few important fixes for 3.10. 3 regression fixes, plus rectified
Haswell overclock support (the old code was correct, only docs confusing)
and improved DP data m/n selection.
* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
drm/i915: correct the calculation of first_pd_entry_in_global_pt
Revert "drm/i915: Don't overclock on Haswell"
drm/i915: Make data/link N value power of two
drm/i915: avoid full modeset when changing the color range properties
drm/i915: Fall back to bit banging mode for DVO transmitter detection
Dave Airlie [Mon, 29 Apr 2013 23:57:46 +0000 (09:57 +1000)]
Merge branch 'exynos-drm-next' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next
This is final pull request for Exynos next and includes device tree
support for fimc device, one revert, some code cleanups and fixup.
The revert replaces wrong one[1] with correct one[2].
This was my mistake and sorry for this.
* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
drm/exynos: Don't blend mixer layer 0
drm/exynos: Remove unnecessary braces in exynos_hdmi.c
drm/exynos: Select VIDEOMODE_HELPERS for FIMD
drm/exynos: do not use generic flags to dumb
drm/exynos: added ipp device registration to drm driver
exynos/drm: hdmi: cleanup for hdmi common device registration
drm/exynos: fix wrong return check for platform_device_register_simple
drm/exynos: add device tree support for fimc ipp driver
drm/exynos: rework fimc clocks handling
drm/exynos: remove redundant devm_kfree()
drm/exynos: enable FIMD clocks
Revert "drm/exynos: prepare FIMD clocks"
Christopher Harvey [Wed, 20 Feb 2013 14:36:24 +0000 (09:36 -0500)]
drm/mgag200: Remove extra variable assigns
These two variables are set again immediately in 'mgag200_modeset_init'
Signed-off-by: Christopher Harvey <charvey@matrox.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Christopher Harvey [Wed, 20 Feb 2013 14:34:22 +0000 (09:34 -0500)]
drm/mgag200: Pass driver specific mga_device in driver functions
Signed-off-by: Christopher Harvey <charvey@matrox.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Christopher Harvey [Mon, 18 Feb 2013 22:33:49 +0000 (17:33 -0500)]
drm/mgag200: Remove pointless call to drm_fb_get_bpp_depth
Signed-off-by: Christopher Harvey <charvey@matrox.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Sean Paul [Thu, 25 Apr 2013 19:13:26 +0000 (15:13 -0400)]
drm/exynos: Don't blend mixer layer 0
This patch disables blending the mixer's layer 0 onto the background
(solid color). It doesn't make sense to blend this layer by default,
and causes color distortion if the layer is used for arbitrary content.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Sachin Kamat [Fri, 26 Apr 2013 05:59:00 +0000 (11:29 +0530)]
drm/exynos: Remove unnecessary braces in exynos_hdmi.c
Silences the following checkpatch warning:
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Sachin Kamat [Thu, 25 Apr 2013 11:36:06 +0000 (17:06 +0530)]
drm/exynos: Select VIDEOMODE_HELPERS for FIMD
FIMD also requires video mode helper APIs.
Without this patch we get the following build error:
drivers/gpu/drm/exynos/exynos_drm_fimd.c:895: undefined reference to
`of_get_fb_videomode'
make: *** [vmlinux] Error 1
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 18 Apr 2013 05:04:17 +0000 (14:04 +0900)]
drm/exynos: do not use generic flags to dumb
This patch removes the use of dumb flags from driver.
As Dave pointed out, the dumb flags are not driver specific
so this should be removed from driver.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Seung-Woo Kim [Tue, 23 Apr 2013 05:02:53 +0000 (14:02 +0900)]
drm/exynos: added ipp device registration to drm driver
This patch added exynos-drm-ipp platform device registration to the exynos drm
driver. When DT is enabled, platform devices need to be registered within the
driver code. This patch fits the requirement of both DT and Non DT based drm
drivers.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Seung-Woo Kim [Mon, 22 Apr 2013 09:40:34 +0000 (18:40 +0900)]
exynos/drm: hdmi: cleanup for hdmi common device registration
The hdmi common device registration function does not need extern definition
and for error case and unregister case, exynos_drm_hdmi_pdev should be cleared.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Seung-Woo Kim [Mon, 22 Apr 2013 08:13:13 +0000 (17:13 +0900)]
drm/exynos: fix wrong return check for platform_device_register_simple
platform_device_register_simple() never returns NULL, but IS_ERR_OR_NULL macro
is used for checking return value in exynos drm driver.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Sylwester Nawrocki [Tue, 23 Apr 2013 11:34:38 +0000 (13:34 +0200)]
drm/exynos: add device tree support for fimc ipp driver
This patch adds OF initialization support for the FIMC driver.
The binding documentation can be found at Documentation/devicetree/
bindings/media/samsung-fimc.txt.
The syscon regmap interface is used to serialize access to the
shared CAMBLK registers from within the V4L2 FIMC-IS and the DRM
FIMC drivers. The DRM driver uses this interface for setting up
the FIFO data link between FIMD and FIMC IP blocks, while the V4L2
one for setting up a data link between the camera ISP and FIMC for
camera capture. The CAMBLK registers are not accessed any more
through a statically mapped IO. Synchronized access to these
registers is required for simultaneous operation of the camera
ISP and the DRM IPP on Exynos4x12.
The driver data and driver_ids static data structures are removed
since Exynos4 is going to be a dt-only platform and there is
currently no board file in mainline that defines platform data
for the FIMC IPP, i.e. uses it.
Camera input signal polarities are not currently parsed from the
device tree.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Sylwester Nawrocki [Tue, 23 Apr 2013 11:34:37 +0000 (13:34 +0200)]
drm/exynos: rework fimc clocks handling
The clocks handling is refactored and a "mux" clock handling is
added to account for changes in the clocks driver. After switching
to the common clock framework the sclk_fimc clock is now split
into two clocks: a gate and a mux clock. In order to retain the
exisiting functionality two additional consumer clocks are passed
to the driver from device tree: "mux" and "parent". Then the driver
sets "parent" clock as a parent clock of the "mux" clock. These two
additional clocks are optional, and should go away when there is a
standard way of setting up parent clocks on DT platforms.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Sylwester Nawrocki [Tue, 23 Apr 2013 11:34:36 +0000 (13:34 +0200)]
drm/exynos: remove redundant devm_kfree()
There is no need for explicit calls of devm_kfree(), as
the allocated memory will be freed during driver's detach.
Remove the redundant devm_kfree() calls from probe() and
remove() callbacks.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Vikas Sajjan [Tue, 23 Apr 2013 11:49:50 +0000 (17:19 +0530)]
drm/exynos: enable FIMD clocks
Common Clock Framework introduced the need to prepare clocks before
enabling them, otherwise clk_enable() fails. This patch adds clk_prepare_enable
and clk_disable_unprepare() calls to the driver.
This patch also removes clk_disable() from fimd_remove() as it will be done
by pm_runtime_put_sync.
Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 25 Apr 2013 10:21:42 +0000 (19:21 +0900)]
Revert "drm/exynos: prepare FIMD clocks"
This reverts commit
b4e3a3e844a0e33cf106a1c9f27ff93340c37640.
Zhang, Xiong Y [Sat, 27 Apr 2013 09:53:33 +0000 (09:53 +0000)]
drm/i915: correct the calculation of first_pd_entry_in_global_pt
When ppgtt is enabled, dev_priv->gtt.total has excluded the gtt space
occupied by ppgtt table in i915_gem_init_global_gtt() function. So the
calculation of first_pd_entry_in_global_pt doesn't need to subtract
I915_PPGTT_PD_ENTRIES again. Or else PPGTT directory table will be
destroyed by global gtt allocation.
This regression has been introduced in
commit
a54c0c279f3864171fe53c66e769d5a137c5c651
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Thu Jan 24 14:45:00 2013 -0800
drm/i915: remove intel_gtt structure
The breakage is pretty subtile since the old gtt_total_entries
included the pde range, whereas the new on did not.
Cc: stable@vger.kernel.org
Signed-off-by: Xiong Zhang<xiong.y.zhang@intel.com>
[danvet: Add regression citation and cc: stable. Thanks to Chris for
correcting my wrong guess about which commit broke things.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Dave Airlie [Fri, 26 Apr 2013 05:42:02 +0000 (15:42 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
"Nothing overly exciting here aside from calim's fermi/kepler vram
compression patches. The rest is misc fixes I gathered from the list.
Most of the stuff from me is fixing issues that have come up from the
work on kepler PM, as well as a commit moving all the old-school
modesetting out of the way (no code changes here). There's other
patches to go on top of that, but, it'll have to wait until I can rip
out the old PM code, it's a bit tangled."
* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (38 commits)
drm/nouveau/fifo: implement channel creation event generation
drm/nouveau/core: allow non-maskable events
drm/nouveau/timer: allow alarms to be cancelled
drm/nouveau/device: tweak the device/subdev relationship a little
drm/nouveau/device: enable proper constructor/destructor
drm/nouveau/device: have engine object initialised before creation
drm/nouveau/device: convert to engine, rather than subdev
drm/nv50-/disp: use self as parent for subobjects
drm/nv50-/fifo: use parent as self for subobjects
drm/nv20-nv30/gr: use parent as self for subobjects
drm/nvc0-/gr: use self as parent for subobjects
drm/nv04-nv40/instmem: use self as parent for subobjects
drm/nv04-nv40/vm: use self as parent for subobjects
drm/nv50-/bar: use self as parent for subobjects
drm/nv04-nv40/instmem: remove parent deref hack
drm/nouveau/i2c: remove parent deref hack
drm/nouveau/core: rebase object ref/use counts after ctor/init/fini events
drm/nv50/disp: inform core when we're not creating a new context
drm/nouveau/therm: send some messages to debug level
drm/nve0/gr: add handling for a bunch of PGRAPH traps
...
Ben Skeggs [Fri, 26 Apr 2013 01:44:26 +0000 (11:44 +1000)]
drm/nouveau/fifo: implement channel creation event generation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 26 Apr 2013 02:03:10 +0000 (12:03 +1000)]
drm/nouveau/core: allow non-maskable events
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 25 Apr 2013 23:17:22 +0000 (09:17 +1000)]
drm/nouveau/timer: allow alarms to be cancelled
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 25 Apr 2013 01:43:54 +0000 (11:43 +1000)]
drm/nouveau/device: tweak the device/subdev relationship a little
Fixes not-in-use engines not having their reset() method called on
resume.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 25 Apr 2013 01:35:18 +0000 (11:35 +1000)]
drm/nouveau/device: enable proper constructor/destructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 25 Apr 2013 07:56:03 +0000 (17:56 +1000)]
drm/nouveau/device: have engine object initialised before creation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 25 Apr 2013 07:23:43 +0000 (17:23 +1000)]
drm/nouveau/device: convert to engine, rather than subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 08:04:22 +0000 (18:04 +1000)]
drm/nv50-/disp: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 08:02:35 +0000 (18:02 +1000)]
drm/nv50-/fifo: use parent as self for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:55:28 +0000 (17:55 +1000)]
drm/nv20-nv30/gr: use parent as self for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:51:20 +0000 (17:51 +1000)]
drm/nvc0-/gr: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:48:56 +0000 (17:48 +1000)]
drm/nv04-nv40/instmem: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:46:54 +0000 (17:46 +1000)]
drm/nv04-nv40/vm: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:44:54 +0000 (17:44 +1000)]
drm/nv50-/bar: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:38:38 +0000 (17:38 +1000)]
drm/nv04-nv40/instmem: remove parent deref hack
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:36:57 +0000 (17:36 +1000)]
drm/nouveau/i2c: remove parent deref hack
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 07:34:18 +0000 (17:34 +1000)]
drm/nouveau/core: rebase object ref/use counts after ctor/init/fini events
This is intended to support named (with a handle, etc) objects having
children that don't have an outside reference.
This will replace the various hacks around the place where subdev
objects have children, and have to manually drop the self-refs so
that they can be destroyed etc when all the outside refs have gone.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 25 Apr 2013 14:12:59 +0000 (00:12 +1000)]
drm/nv50/disp: inform core when we're not creating a new context
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 24 Apr 2013 03:14:02 +0000 (13:14 +1000)]
drm/nouveau/therm: send some messages to debug level
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Christoph Bumiller [Wed, 27 Mar 2013 20:59:11 +0000 (21:59 +0100)]
drm/nve0/gr: add handling for a bunch of PGRAPH traps
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 22 Mar 2013 00:05:03 +0000 (10:05 +1000)]
drm/nouveau/mc: handle irq-related setup ourselves
We need to be able to process interrupts before the DRM code is able to
actually enable them, set it up ourselves. Also, it's less convoluted
to *not* use the DRM wrappers it appears...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 21 Mar 2013 05:45:11 +0000 (15:45 +1000)]
drm/nv04/disp: hide all the cruft away in its own little hole
It'd be pretty awesome if someone would care enough to port this all
properly to a class interface, perhaps submitting a command stream to
the core via a sw object on PFIFO (emulating how EVO works basically,
and also what nvidia have done forever..)..
But, this seems unlikely given how old this hardware is now, so, lets
just hide it away.
There's a heap of other bits and pieces laying around that are still
tangled. I'll (re)move them in pieces.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 19 Apr 2013 00:22:09 +0000 (10:22 +1000)]
drm/nouveau/bios: add missing newline on IO*_OR opcode debugging
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 15 Apr 2013 04:47:05 +0000 (14:47 +1000)]
drm/nouveau/bios: suppress some parser errors when dry-running scripts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 30 Mar 2013 11:56:26 +0000 (21:56 +1000)]
drm/nve0: magic up some support for GF117
Seen in the wild, don't have the hardware but this hacks things up to
treat it the same as GF119 for now.
Should be relatively safe, I'd be very surprised if anything major
changed outside of PGRAPH. PGRAPH (3D etc) is disabled by default
however until it's confirmed working.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Sun, 14 Apr 2013 11:48:45 +0000 (13:48 +0200)]
drm/nvc0-/ltcg: Fix build on 32-bit platforms (v2)
v2: read, don't assume.. *puts on brown paper bag*
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Florian Scholz [Tue, 2 Apr 2013 21:16:38 +0000 (23:16 +0200)]
drm/nouveau/drm: adding support for backlight control of GT525M (NVC0)
This patch adds support for the backlight control of the NVIDIA GT
525M, which identifies itself as a member of the NVC0 family.
v2. Extended to handle Kepler too
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Christoph Bumiller [Wed, 27 Mar 2013 21:25:52 +0000 (22:25 +0100)]
drm/nouveau/drm: bump the driver version to 1.1.1 to report new features
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Christoph Bumiller [Wed, 27 Mar 2013 21:16:55 +0000 (22:16 +0100)]
drm/nvc0/gr: add software methods to control some MP regs
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Christoph Bumiller [Wed, 27 Mar 2013 21:16:54 +0000 (22:16 +0100)]
drm/nvc0-: support NOUVEAU_GETPARAM_GRAPH_UNITS
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Christoph Bumiller [Wed, 27 Mar 2013 21:16:53 +0000 (22:16 +0100)]
drm/nvc0-/ltcg: implement VRAM compression
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 22 Mar 2013 02:12:17 +0000 (12:12 +1000)]
drm/nouveau/ttm: allow tiled memtype on system memory buffer objects
Compression not supported, and will be silently dropped. Original G80
can't handle this either and requires LINEAR memtype, though it's still
possible to correctly texture and m2mf to/from these objects anyway.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 20 Mar 2013 01:34:32 +0000 (11:34 +1000)]
drm/nve0/grctx: initial attempt at unhardcoding yet more magic
Not sure about the (gpc_nr == 1) condition, it's probably wrong but for
all the examples I've seen so far it matches what NVIDIA end up poking.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sat, 23 Feb 2013 16:15:18 +0000 (17:15 +0100)]
drm/nv50/therm: implement temperature reading
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sat, 23 Feb 2013 15:45:51 +0000 (16:45 +0100)]
drm/nouveau/therm: split the nv50 and nv84 code
This is needed because temperature management on nv50 can be enabled and it
looks about the same as nv40.
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Marcin Slusarz [Sat, 2 Mar 2013 19:00:31 +0000 (20:00 +0100)]
drm/nouveau/drm: fix crash in vram manager debug callback
It's probably impossible to hit it now on mainline kernel.
I only noticed it because one of my debugging patches uses it.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 16 Jan 2013 00:05:31 +0000 (10:05 +1000)]
drm/nvc0/fb: ignore readback page alloc failure to support userspace
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 11 Apr 2013 00:12:48 +0000 (10:12 +1000)]
drm/nouveau/disp: fix uninitialised eq_done in error path
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ville Syrjälä [Wed, 24 Apr 2013 16:07:18 +0000 (19:07 +0300)]
drm/edid: Check both 60Hz and 59.94Hz when looking for a CEA mode
drm_match_cea_mode() should be able to match both the 60Hz version,
and the 59.94Hz version of modes.
We only store one pixel clock value per mode in edid_cea_modes, so the
other value must be calculated. Depending on the mode, edid_cea_modes
contains the pixel clock for either the 60Hz version or the 59.94Hz
version, so a bit of care is needed so that the calculation produces
the correct result.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46800
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>
Ville Syrjälä [Wed, 24 Apr 2013 16:07:17 +0000 (19:07 +0300)]
drm/edid: Populate vrefresh for CEA modes
Well have use for the vrefresh information of CEA modes later. Just
populate the information into the table to avoid having to calculate
it.
I'm too lazy to check if someone relies on newly allocated CEA
modes having 0 vrefresh, so just clear vrefresh back to 0 when
adding the mode to the connector's modelist.
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>
Ville Syrjälä [Wed, 24 Apr 2013 16:07:16 +0000 (19:07 +0300)]
drm: Add drm_mode_equal_no_clocks()
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>
Ville Syrjälä [Wed, 24 Apr 2013 16:07:15 +0000 (19:07 +0300)]
drm: Remove explicit vrefresh initialization from DRM_MODE()
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>
Laurent Pinchart [Tue, 12 Mar 2013 14:38:43 +0000 (15:38 +0100)]
drm/shmobile: Fix race condition between page flip request and handler
The page flip handler stores the page flip event pointer and then calls
drm_vblank_get() to enable the vblank interrupt. Due to the vblank off
delay, the vblank interrupt can be enabled in the hardware at that
point, even if the vblank reference count is equal to 0. If a vblank
interrupt is triggered between storing the event pointer and calling
drm_vblank_get(), the page flip completion handler will process the
event and call drm_vblank_put() with a reference count equal to 0. This
will result in a BUG_ON.
Fix the race condition by calling drm_vblank_get() before storing the
event pointer.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Arnd Bergmann [Thu, 25 Apr 2013 17:28:52 +0000 (19:28 +0200)]
drm: export drm_vm_open_locked
The EXYNOS DRM driver uses drm_vm_open_locked in its mmap() function,
and it can be built as a loadable module, which currently fails.
This exports the symbol from the DRM core to avoid
ERROR: "drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Arnd Bergmann [Tue, 23 Apr 2013 16:30:43 +0000 (18:30 +0200)]
drm/tilcdc: use only a single module device table
The tilcdc driver fails to be built as a module because of extraneous
MODULE_DEVICE_TABLE entries:
drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table'
drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here
Since the entire point of these entries is to make the module autoload
when one of the devices is present, it's enough to keep the one entry
for "ti,am33xx-tilcdc", which should always be there if any of the
others are.
Acked-by: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 26 Apr 2013 00:16:10 +0000 (10:16 +1000)]
Merge branch 'gma500-fixes' of git://github.com/patjak/drm-gma500 into drm-next
Two fixes for gma500. First one from Anisse allows us to handle ASLE irqs even
when BIOS doesn't trigger a pipe event irq. The second one allows dual head
setups to have a big shared framebuffer.
* 'gma500-fixes' of git://github.com/patjak/drm-gma500:
drm/gma500: Increase max resolution for mode setting
drm/gma500: fix backlight hotkeys behaviour on netbooks
Patrik Jakobsson [Thu, 25 Apr 2013 20:23:36 +0000 (22:23 +0200)]
drm/gma500: Increase max resolution for mode setting
By having a higher max resolution we can now set up a virtual
framebuffer that spans several monitors. 4096 should be ok since we're
gen 3 or higher and should be enough for most dual head setups.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Anisse Astier [Wed, 24 Apr 2013 15:36:01 +0000 (17:36 +0200)]
drm/gma500: fix backlight hotkeys behaviour on netbooks
Backlight hotkeys weren't working before on certain cedartrail laptops.
The source of this problem is that the hotkeys' ASLE opregion interrupts
were simply ignored. Driver seemed to expect the interrupt to be
associated with a pipe, but it wasn't.
Accepting the ASLE interrupt without an associated pipe event flag fixes
the issue, the backlight code is called when needed, making the
brightness keys work properly.
[patrik: This patch affects irq handling on any netbook with opregion support]
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=833597
Reference: http://lists.freedesktop.org/archives/dri-devel/2012-July/025279.html
Cc: stable@kernel.org
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Ben Widawsky [Wed, 24 Apr 2013 00:33:02 +0000 (17:33 -0700)]
Revert "drm/i915: Don't overclock on Haswell"
This reverts commit
fec46b5eff854df5647a9f4724e45dd33933855a.
The latest version of our PM programming doc (which is WAY better than
previous versions, and thanks for that) says something along the lines
of, "On Haswell overclocking is no long achieved via mailbox registers."
Which I misinterpreted as, the driver must done something different than
it did on IVB, and SNB.
It appears I jumped the gun, and that's all false. We've gotten some
clarification, and it appears at least *reading* the overclocking
information works in exactly the same manner.
Cc: kim.l.saw-chu@intel.com
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Sachin Kamat [Sat, 2 Mar 2013 10:23:09 +0000 (15:53 +0530)]
drm/tilcdc: Fix checkpatch error in tilcdc_panel.c
Fixes the following checkpatch error:
ERROR: "foo * bar" should be "foo *bar"
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Sachin Kamat [Sat, 2 Mar 2013 10:23:08 +0000 (15:53 +0530)]
drm/tilcdc: Remove space before tab
Silences the following checkpatch warning:
WARNING: please, no space before tabs
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Sachin Kamat [Sat, 2 Mar 2013 10:23:07 +0000 (15:53 +0530)]
drm/tilcdc: Remove unnecessary braces
Silences the following checkpatch warning:
WARNING: braces {} are not necessary for any arm of this statement
if (priv->rev == 1) {
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Chen Gang [Sun, 10 Mar 2013 05:04:13 +0000 (13:04 +0800)]
drivers/gpu/drm/tilcdc: Makefile, only -Werror when no -W* in EXTRA_CFLAGS
When make with EXTRA_CFLAGS=-W, it will report error.
so give a check in Makefile.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Sachin Kamat [Sat, 2 Mar 2013 10:23:06 +0000 (15:53 +0530)]
drm/tilcdc: Fix an incorrect condition
Instead of checking if num_encoders is zero, it is being assigned 0.
Convert the assignment to a check.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Mika Kuoppala [Mon, 22 Apr 2013 11:19:26 +0000 (14:19 +0300)]
fbcon: when font is freed, clear also vc_font.data
commit
ae1287865f5361fa138d4d3b1b6277908b54eac9
Author: Dave Airlie <airlied@redhat.com>
Date: Thu Jan 24 16:12:41 2013 +1000
fbcon: don't lose the console font across generic->chip driver switch
uses a pointer in vc->vc_font.data to load font into the new driver.
However if the font is actually freed, we need to clear the data
so that we don't reload font from dangling pointer.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=892340
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>