]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
11 years agodrm/gma500: Fix hibernation problems on sdvo encoders
Patrik Jakobsson [Sun, 7 Apr 2013 14:35:50 +0000 (16:35 +0200)]
drm/gma500: Fix hibernation problems on sdvo encoders

The state of the SDVO chip is more difficult to save than the LVDS so we do a
full mode set on the crtc to get SDVO operational again. The SDVOB/C register is
also stored just in case we have special bits set in the future.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Add hooks for hibernation
Patrik Jakobsson [Fri, 5 Apr 2013 22:45:22 +0000 (00:45 +0200)]
drm/gma500: Add hooks for hibernation

Currently we do whatever is done during suspend/resume but we might need some
more work for hibernation so keep them in separate functions.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Activate the gtt rebuild on suspend/resume
Patrik Jakobsson [Fri, 5 Apr 2013 22:15:21 +0000 (00:15 +0200)]
drm/gma500: Activate the gtt rebuild on suspend/resume

This patch activates the rebuilding of the gtt. Currently we reinitialize the
gtt by inserting the stolen pages again and map the rest to our scratch page.
Then we go about restoring the needed ranges. This is a bit overkill but right
now we don't have that much to restore so better safe than sorry.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Add support for rebuilding the gtt
Patrik Jakobsson [Fri, 5 Apr 2013 21:56:18 +0000 (23:56 +0200)]
drm/gma500: Add support for rebuilding the gtt

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Change fb name so pm-utils doesn't apply quirks
Patrik Jakobsson [Wed, 3 Apr 2013 21:52:04 +0000 (23:52 +0200)]
drm/gma500: Change fb name so pm-utils doesn't apply quirks

By having 'drm' and 'fb' in the fb screeninfo id, pm-utils will leave us
alone. Otherwise we'll have quirks up to our ears and resume will break.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agogma500: Make VGA and HDMI connector hotpluggable
Kero van Gelder [Sun, 31 Mar 2013 11:38:44 +0000 (13:38 +0200)]
gma500: Make VGA and HDMI connector hotpluggable

Both VGA and HDMI connectors are available on my Asus EeePC X101CH.
This patch will cause output to be shown on either when plugged in.
For both, it shows the leftmost 800x600, of the 1024x600 on LVDS.

Signed-off-by: Kero van Gelder <kero@chello.nl>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Clean up various defines
Patrik Jakobsson [Thu, 14 Mar 2013 11:36:54 +0000 (12:36 +0100)]
drm/gma500: Clean up various defines

Remove unused defines that we'll never use and fix naming in some include guards

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Remove unnecessary function exposure
Patrik Jakobsson [Thu, 14 Mar 2013 10:15:30 +0000 (11:15 +0100)]
drm/gma500: Remove unnecessary function exposure

psb_intel_crtc_gamma_set() and psb_intel_crtc_destroy() aren't used outside of
psb_intel_display.c right now so no need to expose them.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Type clock limits directly into array and remove defines
Patrik Jakobsson [Wed, 13 Mar 2013 23:14:06 +0000 (00:14 +0100)]
drm/gma500: Type clock limits directly into array and remove defines

This makes it easier to read. We do the same for cdv so it becomes more
consistent as well.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Calculate clock in one function instead of three identical
Patrik Jakobsson [Wed, 13 Mar 2013 22:32:36 +0000 (23:32 +0100)]
drm/gma500: Calculate clock in one function instead of three identical

i9xx_clock() and i8xx_clock() did the same calc and psb_intel_clock() just
called i9xx_clock() so just move it all into psb_intel_clock().

The same calculation is duplicated in cdv_intel_display.c as well so maybe we
can share it later on.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/gma500: Remove unused i8xx clock limits
Patrik Jakobsson [Wed, 13 Mar 2013 22:24:08 +0000 (23:24 +0100)]
drm/gma500: Remove unused i8xx clock limits

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agogma500: medfield: Fix possible NULL pointer dereference
Syam Sidhardhan [Sun, 24 Feb 2013 22:31:48 +0000 (04:01 +0530)]
gma500: medfield: Fix possible NULL pointer dereference

The use of pointer sender should be after the NULL check.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrivers: gpu: drm: gma500: Replaced calls kzalloc & memcpy with kmemdup
Alexandru Gheorghiu [Mon, 11 Mar 2013 19:46:14 +0000 (21:46 +0200)]
drivers: gpu: drm: gma500: Replaced calls kzalloc & memcpy with kmemdup

Replaced calls kzalloc followed by memcpy with call to kmemdup.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agogma500: remove unused drm_psb_no_fb
Wang YanQing [Wed, 13 Mar 2013 08:19:55 +0000 (16:19 +0800)]
gma500: remove unused drm_psb_no_fb

commit f9f23a77f07506a32d9dc1d925bf85c0e7507b66(gma500: remove no_fb bits)
remove all the drm_psb_no_fb relations code in gma500 except this line code,
so remove it also.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
11 years agodrm/tilcdc: only build on arm
Stephen Rothwell [Mon, 25 Feb 2013 23:54:48 +0000 (09:54 +1000)]
drm/tilcdc: only build on arm

[airlied: hack for now until we fix cma helpers on other OF platforms]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dave Airlie <airlied@linux.ie>
11 years agoMerge branch 'drm/hdmi-for-3.9' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Sun, 24 Feb 2013 02:39:42 +0000 (12:39 +1000)]
Merge branch 'drm/hdmi-for-3.9' of git://anongit.freedesktop.org/tegra/linux into drm-next

Thierry writes:
"Remove a duplicate implementation of the CEA VIC lookup and move the CEA
and other mode tables to drm_edid.c to make it more difficult to create
duplicates of the tables.

Add some helpers to pack CEA-861/HDMI AVI, audio and SPD infoframes into
binary buffers that can easily be written into hardware registers. A new
helper function makes it easy construct an AVI infoframe from a DRM
display mode.

Convert the Tegra and Radeon drivers to use the new HDMI helpers."
* 'drm/hdmi-for-3.9' of git://anongit.freedesktop.org/tegra/linux:
  drm/radeon: Use generic HDMI infoframe helpers
  drm/tegra: Use generic HDMI infoframe helpers
  drm: Add EDID helper documentation
  drm: Add HDMI infoframe helpers
  video: Add generic HDMI infoframe helpers
  drm: Add some missing forward declarations
  drm: Move mode tables to drm_edid.c
  drm: Remove duplicate drm_mode_cea_vic()

11 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel...
Dave Airlie [Sun, 24 Feb 2013 02:39:02 +0000 (12:39 +1000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-next

Two regressions fixes from snowboarding land

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: Revert hdmi HDP pin checks
  drm/i915: Handle untiled planes when computing their offsets

11 years agoMerge branch 'drm/tegra-for-3.9' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Sun, 24 Feb 2013 02:38:22 +0000 (12:38 +1000)]
Merge branch 'drm/tegra-for-3.9' of git://anongit.freedesktop.org/tegra/linux into drm-next

Thierry writes:
"Add support for 2 hardware overlays found on Tegra. These support YUV
pixel formats and can be used as video overlays. .mode_set_base() is
implemented and support for VBLANK and page-flipping is added.

A few minor bug fixes are also included and a new debugfs file allows
to inspect the framebuffers attached to the Tegra DRM device."

* 'drm/tegra-for-3.9' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: Add list of framebuffers to debugfs
  drm/tegra: Fix color expansion
  drm/tegra: Split DC_CMD_STATE_CONTROL register write
  drm/tegra: Implement page-flipping support
  drm/tegra: Implement VBLANK support
  drm/tegra: Implement .mode_set_base()
  drm/tegra: Add plane support
  drm/tegra: Remove bogus tegra_framebuffer structure
  drm: Add consistency check for page-flipping

11 years agodrm/i915: Revert hdmi HDP pin checks
Daniel Vetter [Thu, 21 Feb 2013 23:53:04 +0000 (00:53 +0100)]
drm/i915: Revert hdmi HDP pin checks

This reverts

commit 8ec22b214d76773c9d89f4040505ce10f677ed9a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 11 18:01:34 2012 +0100

    drm/i915/hdmi: Query the live connector status bit for G4x

and

commit b0ea7d37a8f63eeec5ae80b4a6403cfba01da02f
Author: Damien Lespiau <damien.lespiau@intel.com>
Date:   Thu Dec 13 16:09:00 2012 +0000

    drm/i915/hdmi: Read the HPD status before trying to read the EDID

They reliably cause HDMI to not be detected on some systems (like my
ivb or the bug reporters gm45). To fix up the very slow unplug issues
we might want to fire up a 2nd detect cycle a few hundred ms after
each hotplug. But for now at least make displays work again.

I somewhat suspect that this is confined to HDMI connectors, since all
the machines I have with DP+ outputs work correctly.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52361
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org.kernel.org # for 8ec22b21
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/tegra: Add list of framebuffers to debugfs
Thierry Reding [Wed, 13 Feb 2013 15:13:16 +0000 (16:13 +0100)]
drm/tegra: Add list of framebuffers to debugfs

This list is most useful to inspect whether framebuffer reference
counting works as expected. The code is loosely based on the i915
implementation.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Fix color expansion
Thierry Reding [Thu, 21 Feb 2013 07:11:57 +0000 (08:11 +0100)]
drm/tegra: Fix color expansion

bpp stores the number of bytes per pixel, but color expansion needs to
be enabled for less than 24 bits per pixel.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Split DC_CMD_STATE_CONTROL register write
Thierry Reding [Tue, 15 Jan 2013 11:21:36 +0000 (12:21 +0100)]
drm/tegra: Split DC_CMD_STATE_CONTROL register write

The Tegra TRM says that the ACT_REQ and UPDATE fields cannot be
programmed at the same time so they are updated in two consecutive
writes instead.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Implement page-flipping support
Thierry Reding [Wed, 28 Nov 2012 11:00:18 +0000 (12:00 +0100)]
drm/tegra: Implement page-flipping support

All the necessary support bits like .mode_set_base() and VBLANK are now
available, so page-flipping case easily be implemented on top.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Implement VBLANK support
Thierry Reding [Wed, 28 Nov 2012 10:45:47 +0000 (11:45 +0100)]
drm/tegra: Implement VBLANK support

Implement support for the VBLANK IOCTL. Note that Tegra is somewhat
special in this case because it doesn't use the generic IRQ support
provided by the DRM core (DRIVER_HAVE_IRQ) but rather registers one
interrupt handler for each display controller.

While at it, clean up the way that interrupts are enabled to ensure
that the VBLANK interrupt only gets enabled when required.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Implement .mode_set_base()
Thierry Reding [Wed, 28 Nov 2012 10:38:24 +0000 (11:38 +0100)]
drm/tegra: Implement .mode_set_base()

The sequence for replacing the scanout buffer is much shorter than a
full mode change operation so implementing this callback considerably
speeds up cases where only a new framebuffer is to be scanned out.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Add plane support
Thierry Reding [Sun, 4 Nov 2012 20:47:13 +0000 (21:47 +0100)]
drm/tegra: Add plane support

Add support for the B and C planes which support RGB and YUV pixel
formats and can be used as overlays or hardware cursor. Currently 32-bit
XRGB as well as UYVY, YUV420 and YUV422 pixel formats are advertised.
Other formats should be easy to add but these are the most common ones
and should cover the majority of use-cases.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm/tegra: Remove bogus tegra_framebuffer structure
Thierry Reding [Tue, 19 Feb 2013 15:22:51 +0000 (16:22 +0100)]
drm/tegra: Remove bogus tegra_framebuffer structure

Tegra uses the CMA FB helpers so framebuffers passed to the driver need
to use the corresponding functions to access the underlying GEM objects.

This used to work because struct tegra_framebuffer was sufficiently
similar to struct drm_fb_cma but that isn't guaranteed to stay that way.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agodrm: Add consistency check for page-flipping
Thierry Reding [Wed, 13 Feb 2013 15:08:33 +0000 (16:08 +0100)]
drm: Add consistency check for page-flipping

Driver implementations of the drm_crtc's .page_flip() function are
required to update the crtc->fb field on success to reflect that the new
framebuffer is now in use. This is important to keep reference counting
on the framebuffers balanced.

While at it, document this requirement to keep others from falling into
the same trap.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/radeon: Use generic HDMI infoframe helpers
Thierry Reding [Mon, 14 Jan 2013 12:36:30 +0000 (13:36 +0100)]
drm/radeon: Use generic HDMI infoframe helpers

Use the generic HDMI infoframe helpers to get rid of the duplicate
implementation in the radeon driver.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/tegra: Use generic HDMI infoframe helpers
Thierry Reding [Fri, 23 Nov 2012 14:14:00 +0000 (15:14 +0100)]
drm/tegra: Use generic HDMI infoframe helpers

Use the generic HDMI infoframe helpers to get rid of the NVIDIA Tegra
reimplementation.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm: Add EDID helper documentation
Thierry Reding [Mon, 14 Jan 2013 08:00:31 +0000 (09:00 +0100)]
drm: Add EDID helper documentation

Add a reference section about the EDID helper functions to the DRM
documentation.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm: Add HDMI infoframe helpers
Thierry Reding [Wed, 21 Nov 2012 14:31:35 +0000 (15:31 +0100)]
drm: Add HDMI infoframe helpers

Add a generic helper to fill in an HDMI AVI infoframe with data
extracted from a DRM display mode.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agovideo: Add generic HDMI infoframe helpers
Thierry Reding [Wed, 21 Nov 2012 14:29:29 +0000 (15:29 +0100)]
video: Add generic HDMI infoframe helpers

Add generic helpers to pack HDMI infoframes into binary buffers.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm: Add some missing forward declarations
Thierry Reding [Wed, 21 Nov 2012 14:00:47 +0000 (15:00 +0100)]
drm: Add some missing forward declarations

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>
11 years agodrm: Move mode tables to drm_edid.c
Thierry Reding [Fri, 23 Nov 2012 14:01:42 +0000 (15:01 +0100)]
drm: Move mode tables to drm_edid.c

The modes are only used from within drm_edid.c so we move them there to
avoid creating duplicates by multiple inclusion of drm_edid_modes.h. As
a side-effect we can also get rid of a few variables that keep track of
the number of entries in the tables and use ARRAY_SIZE() instead.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm: Remove duplicate drm_mode_cea_vic()
Thierry Reding [Thu, 20 Dec 2012 14:41:44 +0000 (15:41 +0100)]
drm: Remove duplicate drm_mode_cea_vic()

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>
11 years agoMerge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daein...
Dave Airlie [Fri, 22 Feb 2013 00:17:11 +0000 (10:17 +1000)]
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

The summary:
. Add display mode check operaion to mixer driver
  - Mixer IP also can put certain restrictions on the proposed
    display modes and these restrictions need to be considered
    during mode negotiation, which happens immediately after
    edid parsing.
. Set correct mode for range of resolutions
  - With this patch, the mixer driver could find the correct mode
    for the range of resolutions upto 1080 vertical lines.
. Support extra resolution for hdmi
  - This patch programs the core and timing generator registers
    using the timing data provided in drm_display_mode without
    hard-coded configurations. So this patch adds additional PHY
    configs to allow us to support more permissible resolutions
    and refresh rates.
. Add device tree support for g2d
  - This patch adds just the compatible string for exynos5250 SoC
    so that with device tree enabling, this driver can be probed.
. And bug fixes and code cleanups.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: Add device tree based discovery support for G2D
  drm/exynos: hdmi: support extra resolutions using drm_display_mode timings
  drm/exynos: mixer: set correct mode for range of resolutions
  drm/exynos: implement display-mode-check callback in mixer driver
  drm/exynos: add display-mode-check operation to exynos_mixer_ops struct
  drm/exynos: release resources properly when fb creation is failed.
  drm/exynos: fix wrong pointer access at vm close.
  drm/exynos: Add missing braces around sizeof
  drm/exynos: consider exception case to fb handle creation
  drm/exynos: fix iommu address allocation order

11 years agogma500: Fix n, m1 and m2 clock limits for sdvo and lvds
Patrik Jakobsson [Sat, 16 Feb 2013 12:04:21 +0000 (13:04 +0100)]
gma500: Fix n, m1 and m2 clock limits for sdvo and lvds

The values of n, m1 and m2 needs to be subtracted by 2 before writing them to
the FP register. The dot clock calculation already thinks of these values in
register form so we must also specify them as such.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/i915: Handle untiled planes when computing their offsets
Chris Wilson [Thu, 21 Feb 2013 20:04:31 +0000 (20:04 +0000)]
drm/i915: Handle untiled planes when computing their offsets

We trim the fb to fit the CRTC by computing the offset of that CRTC to
its nearest tile_row origin. This allows us to use framebuffers that are
larger than the CRTC limits without additional work.

However, we failed to compute the offset for a linear framebuffer
correctly as we treated its x-advance in whole tiles (instead of the
linear increment expected), leaving the CRTC misaligned with its
contents.

Fixes regression from commit c2c75131244507c93f812862fdbd4f3a37139401
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Jul 5 12:17:30 2012 +0200

    drm/i915: adjust framebuffer base address on gen4+

v2: Adjust relative x-coordinate after linear alignment (vsyrjala)
v3: Repaint with pokadots (vsyrjala)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61152
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/exynos: Add device tree based discovery support for G2D
Ajay Kumar [Wed, 6 Feb 2013 05:29:44 +0000 (10:59 +0530)]
drm/exynos: Add device tree based discovery support for G2D

This patch adds device tree match table for Exynos G2D controller.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: hdmi: support extra resolutions using drm_display_mode timings
Sean Paul [Tue, 15 Jan 2013 13:11:08 +0000 (08:11 -0500)]
drm/exynos: hdmi: support extra resolutions using drm_display_mode timings

This patch programs the core and timing generator registers using the
timing data provided in drm_display_mode and not using hard-coded
configurations.

Additional PHY configs has been added. This allows us to support more
permissible resolutions and refresh rates.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Shirish S <s.shirish@samsung.com>
Signed-off-by: Akshay Saraswat <Akshay.s@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: mixer: set correct mode for range of resolutions
Rahul Sharma [Tue, 15 Jan 2013 13:11:07 +0000 (08:11 -0500)]
drm/exynos: mixer: set correct mode for range of resolutions

With this patch, mixer driver find the correct resolution mode for
the range of resolutions, upto 1080 vertical lines. Resolution will
be categorized to NTSC SD, PAL SD or HD and the correct mode is
set to the mixer configuration register.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: implement display-mode-check callback in mixer driver
Rahul Sharma [Tue, 15 Jan 2013 13:11:06 +0000 (08:11 -0500)]
drm/exynos: implement display-mode-check callback in mixer driver

This patch adds the implementation of check_timing callback in the mixer
driver. Based on the mixer version, correct set of restrictions will be
exposed by the mixer driver. A resolution will be acceptable only if passes
the criteria set by mixer and hdmi IPs.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: add display-mode-check operation to exynos_mixer_ops struct
Rahul Sharma [Tue, 15 Jan 2013 13:11:05 +0000 (08:11 -0500)]
drm/exynos: add display-mode-check operation to exynos_mixer_ops struct

This patch adds the display mode check operation to exynos_mixer_ops
in drm-common-hdmi. In Exynos SoCs, mixer IP can put certain restrictions
on the proposed display modes. These restriction needs to be considered
during mode negotiation, which happens immediately after edid parsing.

Both, mixer check-mode and hdmi check-timing callbacks are called one after
another and ANDed result is returned back.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: release resources properly when fb creation is failed.
YoungJun Cho [Tue, 12 Feb 2013 12:23:54 +0000 (21:23 +0900)]
drm/exynos: release resources properly when fb creation is failed.

This patch releases allocated resources properly when
exynos_user_fb_create() is failed.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: fix wrong pointer access at vm close.
YoungJun Cho [Thu, 7 Feb 2013 07:17:54 +0000 (16:17 +0900)]
drm/exynos: fix wrong pointer access at vm close.

This patch fixes wrong pointer access issue to filp->f_op and
filp->private_data.

The exynos_drm_gem_mmap_ioctl() changes filp->f_op and
filp->private_data temporarily and restore them to use
original ones in exynos_drm_gem_mmap_buffer() but there
was no lock between the changing and the restoring so
wrong pointer access to filp->f_op and filp->private_data
was induced by vm close callback.

So this patch uses mutex lock properly to resolve this issue.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: Add missing braces around sizeof
Sachin Kamat [Fri, 25 Jan 2013 09:15:42 +0000 (14:45 +0530)]
drm/exynos: Add missing braces around sizeof

Fixes the following checkpatch warning:
WARNING: sizeof *sgt should be sizeof(*sgt)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: consider exception case to fb handle creation
Inki Dae [Tue, 29 Jan 2013 08:51:09 +0000 (17:51 +0900)]
drm/exynos: consider exception case to fb handle creation

GETFB ioctl request creates a new handle to only one gem object
so it should check if the given fb has one gem object.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: fix iommu address allocation order
Inki Dae [Tue, 29 Jan 2013 07:28:30 +0000 (16:28 +0900)]
drm/exynos: fix iommu address allocation order

This patch modifies iommu address allocation order from 64k
to 4k. 64k order causes waste of the io space and this was
our mistakes.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agoMerge branch 'tilcdc-next' of git://people.freedesktop.org/~robclark/linux into drm...
Dave Airlie [Wed, 20 Feb 2013 23:31:47 +0000 (09:31 +1000)]
Merge branch 'tilcdc-next' of git://people.freedesktop.org/~robclark/linux into drm-next

KMS driver for TI LCD controller

* 'tilcdc-next' of git://people.freedesktop.org/~robclark/linux:
  drm/tilcdc: add support for LCD panels (v5)
  drm/tilcdc: add encoder slave (v2)
  drm/i2c: nxp-tda998x (v3)
  drm/tilcdc: add TI LCD Controller DRM driver (v4)
  drm/nouveau: use i2c encoder helper wrappers
  drm: i2c encoder helper wrappers
  drm/cma: add debugfs helpers
  drm: small fix in drm_send_vblank_event()
  drm: Don't set the plane->fb to NULL on successfull set_plane
  drm/cma-helper: fixup compilation

Conflicts:
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_fb_cma_helper.c

11 years agoMerge branch 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Wed, 20 Feb 2013 21:15:10 +0000 (07:15 +1000)]
Merge branch 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux into drm-next

More drm-next bits for radeon.  Just bug fixes.

* 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: properly validate the atpx interface
  drm/radeon: switch get_gpu_clock() to a callback (v2)
  drm/radeon: add a asic callback to get the xclk
  drm/radeon: Avoid NULL pointer dereference from atom_index_iio() allocation failure
  drm/radeon: remove overzealous warning in hdmi handling
  drm/radeon: fix multi-head power profile stability on BTC+ asics

11 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Wed, 20 Feb 2013 21:13:17 +0000 (07:13 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

restore debugfs vbios, fix multiple actions with supervisor intrs

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: restore debugfs/vbios.rom support
  drm/nv50-/kms: remove UPDATE methods after each encoder disconnect
  drm/nvd0/disp: handle multiple actions from one set of supervisor intrs
  drm/nv50/disp: handle multiple actions from one set of supervisor intrs

11 years agodrm/radeon: properly validate the atpx interface
Alex Deucher [Tue, 19 Feb 2013 17:55:52 +0000 (12:55 -0500)]
drm/radeon: properly validate the atpx interface

Some bioses don't set the function mask correctly
which caused required functions to be disabled.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=53111

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agodrm/radeon: switch get_gpu_clock() to a callback (v2)
Alex Deucher [Thu, 24 Jan 2013 15:35:23 +0000 (10:35 -0500)]
drm/radeon: switch get_gpu_clock() to a callback (v2)

Cleans up the code for future asics

v2: rebase, fix some missing radeon_asic updates

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: add a asic callback to get the xclk
Alex Deucher [Thu, 14 Feb 2013 15:04:02 +0000 (10:04 -0500)]
drm/radeon: add a asic callback to get the xclk

This is required to get the reference clock used
by the gfx engine for things like timestamps. Fixes
support for GL extensions the use timestamps on
certain boards.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: Avoid NULL pointer dereference from atom_index_iio() allocation failure
Tim Gardner [Mon, 11 Feb 2013 21:34:32 +0000 (14:34 -0700)]
drm/radeon: Avoid NULL pointer dereference from atom_index_iio() allocation failure

Smatch anlysis:

drivers/gpu/drm/radeon/atom.c:1242 atom_index_iio() error: potential null
 dereference 'ctx->iio'.  (kzalloc returns null)

Also cleaned up some checks before calls to kfree(). kfree(NULL) is OK.

Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Michel Dänzer" <michel.daenzer@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: remove overzealous warning in hdmi handling
Alex Deucher [Tue, 12 Feb 2013 13:39:10 +0000 (08:39 -0500)]
drm/radeon: remove overzealous warning in hdmi handling

hdmi audio works fine.  The warning just confuses users.

fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=44341

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Cc: stable@vger.kernel.org
11 years agodrm/radeon: fix multi-head power profile stability on BTC+ asics
Alex Deucher [Mon, 11 Feb 2013 13:44:48 +0000 (08:44 -0500)]
drm/radeon: fix multi-head power profile stability on BTC+ asics

vddci needs to track mclk for multi-head.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agodrm/nouveau: restore debugfs/vbios.rom support
Marcin Slusarz [Fri, 8 Feb 2013 20:42:13 +0000 (21:42 +0100)]
drm/nouveau: restore debugfs/vbios.rom support

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
11 years agodrm/nv50-/kms: remove UPDATE methods after each encoder disconnect
Ben Skeggs [Wed, 20 Feb 2013 10:37:15 +0000 (20:37 +1000)]
drm/nv50-/kms: remove UPDATE methods after each encoder disconnect

Supervisor can now handle more than one operation within a single
series of interrupts.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvd0/disp: handle multiple actions from one set of supervisor intrs
Ben Skeggs [Wed, 20 Feb 2013 09:21:08 +0000 (19:21 +1000)]
drm/nvd0/disp: handle multiple actions from one set of supervisor intrs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/disp: handle multiple actions from one set of supervisor intrs
Ben Skeggs [Wed, 20 Feb 2013 08:56:33 +0000 (18:56 +1000)]
drm/nv50/disp: handle multiple actions from one set of supervisor intrs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agogpu: remove gma500 stub driver
Lee, Chun-Yi [Wed, 20 Feb 2013 06:32:01 +0000 (14:32 +0800)]
gpu: remove gma500 stub driver

In v3.3, the gma500 drm driver moved from staging to drm group by
Alan Cox's 3abcf41fb patch. the gma500 drm driver should control
brightness well and don't need gma500 stub driver anymore.

Reference:
http://lists.freedesktop.org/archives/dri-devel/2012-May/023426.html
http://lists.freedesktop.org/archives/dri-devel/2012-May/023467.html

Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Wed, 20 Feb 2013 07:46:25 +0000 (17:46 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

Nothing terribly exciting in here probably:
- reworked thermal stuff from mupuf/I, has a chance of possibly working
well enough when we get to being able to reclock..
- driver will report mmio access faults on chipsets where it's supported
- will now sleep waiting on fences on nv84+ rather than polling
- some cleanup of the internal fencing, looking towards sli/dmabuf sync
- initial support for anx9805 dp/tmds encoder
- nv50+ display fixes related to the above, and also might fix a few
other issues
- nicer error reporting (will log process names with channel errors)
- various other random fixes

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (87 commits)
  nouveau: ACPI support depends on X86 and X86_PLATFORM_DEVICES
  drm/nouveau/i2c: add support for ddc/aux, and dp link training on anx9805
  drm/nv50: initial kms support for off-chip TMDS/DP encoders
  drm/nv50-/disp: initial supervisor support for off-chip encoders
  drm/nv50-/disp: initial work towards supporting external encoders
  drm/nv50-/kms: remove unnecessary wait-for-completion points
  drm/nv50-/disp: move DP link training to core and train from supervisor
  drm/nv50-/disp: handle supervisor tasks from workqueue
  drm/nouveau/i2c: create proper chipset-specific class implementations
  drm/nv50-/disp: 0x0000 is a valid udisp config value
  drm/nv50/devinit: reverse the logic for running encoder init scripts
  drm/nouveau/bios: store a type/mask hash in parsed dcb data
  drm/nouveau/i2c: extend type to 16-bits, add lookup-by-type function
  drm/nouveau/i2c: aux channels not necessarily on nvio
  drm/nouveau/i2c: fix a bit of a thinko in nv_wri2cr helper functions
  drm/nouveau/bios: parse external transmitter type if off-chip
  drm/nouveau: store i2c port pointer directly in nouveau_encoder
  drm/nouveau/i2c: handle i2c/aux mux outside of port lookup function
  drm/nv50/graph: avoid touching 400724, it doesn't exist
  drm/nouveau: Fix DPMS 1 on G4 Snowball, from snow white to coal black.
  ...

11 years agonouveau: ACPI support depends on X86 and X86_PLATFORM_DEVICES
Ben Hutchings [Wed, 20 Feb 2013 02:57:32 +0000 (02:57 +0000)]
nouveau: ACPI support depends on X86 and X86_PLATFORM_DEVICES

If I build nouveau on ia64, Kconfig warns:

warning: (DRM_NOUVEAU) selects ACPI_WMI which has unmet direct dependencies (X86 && X86_PLATFORM_DEVICES && ACPI)
warning: (DRM_NOUVEAU) selects MXM_WMI which has unmet direct dependencies (X86 && X86_PLATFORM_DEVICES && ACPI_WMI)

Make all the ACPI support depend on X86 and select
X86_PLATFORM_DEVICES.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: add support for ddc/aux, and dp link training on anx9805
Ben Skeggs [Thu, 14 Feb 2013 22:48:58 +0000 (17:48 -0500)]
drm/nouveau/i2c: add support for ddc/aux, and dp link training on anx9805

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50: initial kms support for off-chip TMDS/DP encoders
Ben Skeggs [Sun, 10 Feb 2013 23:52:58 +0000 (09:52 +1000)]
drm/nv50: initial kms support for off-chip TMDS/DP encoders

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/disp: initial supervisor support for off-chip encoders
Ben Skeggs [Sun, 10 Feb 2013 23:24:23 +0000 (09:24 +1000)]
drm/nv50-/disp: initial supervisor support for off-chip encoders

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/disp: initial work towards supporting external encoders
Ben Skeggs [Sun, 10 Feb 2013 23:11:08 +0000 (09:11 +1000)]
drm/nv50-/disp: initial work towards supporting external encoders

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/kms: remove unnecessary wait-for-completion points
Ben Skeggs [Wed, 20 Feb 2013 04:34:18 +0000 (14:34 +1000)]
drm/nv50-/kms: remove unnecessary wait-for-completion points

DP link training is now handled as part of the supervisor processing,
and can no longer race with it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/disp: move DP link training to core and train from supervisor
Ben Skeggs [Tue, 19 Feb 2013 04:17:53 +0000 (23:17 -0500)]
drm/nv50-/disp: move DP link training to core and train from supervisor

We need to be able to do link training for PIOR-connected ANX9805 from
the third supervisor handler (due to script ordering in the bios, can't
have the "user" call train because some settings are overwritten from
the modesetting bios scripts).

This moves link training for SOR-connected DP encoders to the second
supervisor interrupt, *before* we call the modesetting scripts (yes,
different ordering from PIOR is necessary).  This is useful since we
should now be able to remove some hacks to workaround races between
the supervisor and link training paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/disp: handle supervisor tasks from workqueue
Ben Skeggs [Mon, 18 Feb 2013 22:50:51 +0000 (17:50 -0500)]
drm/nv50-/disp: handle supervisor tasks from workqueue

i2c_algo_bit sleeps...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: create proper chipset-specific class implementations
Ben Skeggs [Sat, 16 Feb 2013 05:21:58 +0000 (15:21 +1000)]
drm/nouveau/i2c: create proper chipset-specific class implementations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/disp: 0x0000 is a valid udisp config value
Ben Skeggs [Sat, 16 Feb 2013 03:49:21 +0000 (13:49 +1000)]
drm/nv50-/disp: 0x0000 is a valid udisp config value

Return an out-of-range value instead to signal a failure from
exec_clkcmp().

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/devinit: reverse the logic for running encoder init scripts
Ben Skeggs [Sat, 16 Feb 2013 02:10:38 +0000 (12:10 +1000)]
drm/nv50/devinit: reverse the logic for running encoder init scripts

A single U encoder table can match multiple DCB entries, whereas the
reverse is not true and can lead to us not matching a DCB entry at
all, and fail to initialise some encoders.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/bios: store a type/mask hash in parsed dcb data
Ben Skeggs [Sat, 16 Feb 2013 02:01:59 +0000 (12:01 +1000)]
drm/nouveau/bios: store a type/mask hash in parsed dcb data

Matches format used by a couple of other vbios tables, useful
to have laying around already calculated.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: extend type to 16-bits, add lookup-by-type function
Ben Skeggs [Sat, 16 Feb 2013 03:19:18 +0000 (13:19 +1000)]
drm/nouveau/i2c: extend type to 16-bits, add lookup-by-type function

For off-chip transmitters we won't necessarily have an i2c table entry
to lookup, but we can do it instead by encoding the type to include
the extdev type and looking that up instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: aux channels not necessarily on nvio
Ben Skeggs [Fri, 15 Feb 2013 01:59:41 +0000 (20:59 -0500)]
drm/nouveau/i2c: aux channels not necessarily on nvio

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: fix a bit of a thinko in nv_wri2cr helper functions
Ben Skeggs [Fri, 15 Feb 2013 00:54:42 +0000 (19:54 -0500)]
drm/nouveau/i2c: fix a bit of a thinko in nv_wri2cr helper functions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/bios: parse external transmitter type if off-chip
Ben Skeggs [Tue, 12 Feb 2013 00:16:31 +0000 (10:16 +1000)]
drm/nouveau/bios: parse external transmitter type if off-chip

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: store i2c port pointer directly in nouveau_encoder
Ben Skeggs [Mon, 11 Feb 2013 10:15:03 +0000 (20:15 +1000)]
drm/nouveau: store i2c port pointer directly in nouveau_encoder

This is about to become somewhat more complicated to determine in a
number of cases, so store the "common" case (DDC/AUX) directly inside
the encoder structure.

Pre-nv50 code not touched except to fill the pointer, don't care.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: handle i2c/aux mux outside of port lookup function
Ben Skeggs [Mon, 11 Feb 2013 10:06:04 +0000 (20:06 +1000)]
drm/nouveau/i2c: handle i2c/aux mux outside of port lookup function

Not quite how I want it yet, but, I'll fix that at some point.  For
right now, it's needed because find() won't necessarily be used right
before a transaction anymore.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/graph: avoid touching 400724, it doesn't exist
Ben Skeggs [Sun, 17 Feb 2013 01:31:17 +0000 (11:31 +1000)]
drm/nv50/graph: avoid touching 400724, it doesn't exist

Harmless, but we now get MMIO fault reports, so silence it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: Fix DPMS 1 on G4 Snowball, from snow white to coal black.
Stefan de Konink [Sat, 22 Dec 2012 17:04:37 +0000 (18:04 +0100)]
drm/nouveau: Fix DPMS 1 on G4 Snowball, from snow white to coal black.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40275.

Signed-off-by: Stefan de Konink <stefan@konink.de>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/disp: sizeof() wrong pointer
Dan Carpenter [Wed, 23 Jan 2013 08:27:56 +0000 (11:27 +0300)]
drm/nouveau/disp: sizeof() wrong pointer

"data" is a void pointer and "args" is "data" after we have casted it to
a struct.  We care about the size of the struct here.  Btw,
sizeof(*data) is 1.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv84-/fence: prepare for emit/sync support of sysram sequences
Ben Skeggs [Thu, 14 Feb 2013 03:43:21 +0000 (13:43 +1000)]
drm/nv84-/fence: prepare for emit/sync support of sysram sequences

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fence: make internal hooks part of the context
Ben Skeggs [Thu, 14 Feb 2013 03:20:17 +0000 (13:20 +1000)]
drm/nouveau/fence: make internal hooks part of the context

A step towards being able to provide fences from other engines not
connected to PFIFO.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv17/fence: split from nv10 code
Ben Skeggs [Thu, 14 Feb 2013 02:59:36 +0000 (12:59 +1000)]
drm/nv17/fence: split from nv10 code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv84-/fence: abstract class emit/sync functions to virt+sequence
Ben Skeggs [Wed, 13 Feb 2013 23:37:35 +0000 (09:37 +1000)]
drm/nv84-/fence: abstract class emit/sync functions to virt+sequence

Now can be used to operate on any buffer mapped into the GPU virtual
address and not just the main inter-channel sync buffer.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv84/fence: access fences with full virtual address, not offset
Ben Skeggs [Wed, 13 Feb 2013 23:28:37 +0000 (09:28 +1000)]
drm/nv84/fence: access fences with full virtual address, not offset

Allows most of the code to be shared between nv84/nvc0 implementations,
and paves the way for doing emit/sync on non-VRAM buffers (multi-gpu,
dma-buf).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/gpio/nve0: interrupt regs moved on kepler apparently
Ben Skeggs [Wed, 13 Feb 2013 03:34:39 +0000 (13:34 +1000)]
drm/nouveau/gpio/nve0: interrupt regs moved on kepler apparently

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/gpio: use event interfaces for interrupt signalling
Ben Skeggs [Sun, 3 Feb 2013 02:56:16 +0000 (12:56 +1000)]
drm/nouveau/gpio: use event interfaces for interrupt signalling

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/gpio: pass number of on-die gpio lines to base
Ben Skeggs [Sun, 3 Feb 2013 21:08:20 +0000 (07:08 +1000)]
drm/nouveau/gpio: pass number of on-die gpio lines to base

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/drm: store full dcb gpio function data in connector
Ben Skeggs [Sun, 3 Feb 2013 10:29:53 +0000 (20:29 +1000)]
drm/nouveau/drm: store full dcb gpio function data in connector

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fence/nv84-: put processes to sleep while waiting on fences
Ben Skeggs [Thu, 31 Jan 2013 04:57:33 +0000 (14:57 +1000)]
drm/nouveau/fence/nv84-: put processes to sleep while waiting on fences

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fifo/nvc0: bash some magic reg to make uevent interrupt work
Ben Skeggs [Thu, 31 Jan 2013 22:43:55 +0000 (17:43 -0500)]
drm/nouveau/fifo/nvc0: bash some magic reg to make uevent interrupt work

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fifo/nv84: support user event trigger
Ben Skeggs [Thu, 31 Jan 2013 12:41:07 +0000 (22:41 +1000)]
drm/nouveau/fifo/nv84: support user event trigger

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fifo/nvc0-: use interrupt 31 as an event trigger
Ben Skeggs [Thu, 31 Jan 2013 03:51:20 +0000 (13:51 +1000)]
drm/nouveau/fifo/nvc0-: use interrupt 31 as an event trigger

Generated if you try and use fifo method 0x20 on any subchannel, appears
that it can be safely masked off without stalling the whole GPU.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/disp: port vblank handling to event interface
Ben Skeggs [Wed, 30 Jan 2013 23:23:34 +0000 (09:23 +1000)]
drm/nouveau/disp: port vblank handling to event interface

This removes the nastiness with the interactions between display and
software engines when handling vblank semaphore release interrupts.

Now, all the semantics are handled in one place (sw) \o/.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/disp/nv04: implement a base display object class
Ben Skeggs [Wed, 30 Jan 2013 23:04:48 +0000 (09:04 +1000)]
drm/nouveau/disp/nv04: implement a base display object class

Will be used for upcoming vblank event interfaces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>