GitHub/LineageOS/android_kernel_motorola_exynos9610.git
9 years agomedia-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format
Philipp Zabel [Fri, 17 Apr 2015 17:12:41 +0000 (19:12 +0200)]
media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format

Change the constant values for RGB444_1X12, RGB565_1X16, and YUV8_1X24 media
bus formats in anticipation of a merge conflict with the media tree, where
the old values are already taken by RBG888_1X24, RGB888_1X32_PADHI, and
VUY8_1X24, respectively.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge tag 'drm-intel-next-fixes-2015-04-15' of git://anongit.freedesktop.org/drm...
Dave Airlie [Wed, 15 Apr 2015 22:34:51 +0000 (08:34 +1000)]
Merge tag 'drm-intel-next-fixes-2015-04-15' of git://anongit.freedesktop.org/drm-intel into drm-next

Misc i915 fixes.

* tag 'drm-intel-next-fixes-2015-04-15' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Dont enable CS_PARSER_ERROR interrupts at all
  drm/i915: Move drm_framebuffer_unreference out of struct_mutex for takeover
  drm/i915: Allocate connector state together with the connectors
  drm/i915/chv: Remove DPIO force latency causing interpair skew issue
  drm/i915: Don't cancel DRRS worker synchronously for flush/invalidate
  drm/i915: Fix locking in DRRS flush/invalidate hooks

9 years agoMerge tag 'topic/drm-misc-2015-04-15' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Wed, 15 Apr 2015 22:34:24 +0000 (08:34 +1000)]
Merge tag 'topic/drm-misc-2015-04-15' of git://anongit.freedesktop.org/drm-intel into drm-next

One more drm-misch pull for 4.1 with mostly simple stuff and boring
refactoring. Even the cursor fix from Matt is just to make a really anal
igt happy.

* tag 'topic/drm-misc-2015-04-15' of git://anongit.freedesktop.org/drm-intel:
  drm: fix trivial typo mistake
  drm: Make integer overflow checking cover universal cursor updates (v2)
  drm: make crtc/encoder/connector/plane helper_private a const pointer
  drm/armada: constify struct drm_encoder_helper_funcs pointer
  drm/radeon: constify more struct drm_*_helper funcs pointers
  drm/edid: add #defines for ELD versions
  drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros
  drm: Use kref_put_mutex in drm_gem_object_unreference_unlocked
  drm/drm: constify all struct drm_*_helper funcs pointers
  drm/qxl: constify all struct drm_*_helper funcs pointers
  drm/nouveau: constify all struct drm_*_helper funcs pointers
  drm/radeon: constify all struct drm_*_helper funcs pointers
  drm/gma500: constify all struct drm_*_helper funcs pointers
  drm/mgag200: constify all struct drm_*_helper funcs pointers
  drm/exynos: constify all struct drm_*_helper funcs pointers
  drm: Fix some typos

9 years agoMerge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
Dave Airlie [Wed, 15 Apr 2015 22:33:30 +0000 (08:33 +1000)]
Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

This set of patches adjust the setup of the HDMI CTS/N values for audio
support to be compliant with the work-around given in the iMX6 errata
documentation as part of the preparation for integrating audio support
for this driver, and also update the HDMI phy configuration for Rockchip
devices to improve the HDMI eye pattern.

* 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm: rockchip/dw_hdmi-rockchip: improve for HDMI electrical test
  drm: bridge/dw_hdmi: separate VLEVCTRL settting into platform driver
  drm: bridge/dw_hdmi: fixed codec style
  drm: bridge/dw_hdmi: adjust n/cts setting order
  drm: bridge/dw_hdmi: protect n/cts setting with a mutex
  drm: bridge/dw_hdmi: combine hdmi_set_clock_regenerator_n() and hdmi_regenerate_cts()

Conflicts:
drivers/gpu/drm/imx/dw_hdmi-imx.c

9 years agoMerge branch 'drm-next-4.1' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Wed, 15 Apr 2015 22:00:06 +0000 (08:00 +1000)]
Merge branch 'drm-next-4.1' of git://people.freedesktop.org/~agd5f/linux into drm-next

Some final bits for 4.1.  Some fixes for userptrs and allow a new
packet for VCE to enable some new features in mesa.

* 'drm-next-4.1' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: allow creating overlapping userptrs
  drm/radeon: add userptr config option
  drm/radeon: add video usability info support for VCE

9 years agoMerge branch 'linux-4.1' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into...
Dave Airlie [Wed, 15 Apr 2015 02:47:29 +0000 (12:47 +1000)]
Merge branch 'linux-4.1' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

- gk20a iommu support
- gm107 graphics support without needing proprietary ucode
- various random fixes
- more gm20x bring-up, fifo/ce are ok, gr is mostly complete with the
exception of ctxsw ucode.. nvidia aren't playing nice yet so there's
not much more that can be done at this point...

I spent a lot of time trying to find a viable way of doing gr ctxsw
without signed firmware, but the "security" restrictions on the
fecs/gpccs falcons are excessive and go beyond what'd be necessary to
protect the host from malicious firmware.  This newer nvidia hw is
VERY open-source unfriendly.

I have some experimental host-based ctxsw work that could be a viable
(albeit unsatisfactory and slow) workaround in the meantime, but it
needs some more work and i'd like to get the 3d driver working
properly before i commit to pushing it.

* 'linux-4.1' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (40 commits)
  drm/nouveau/bios: fix fetching from acpi on certain systems
  drm/nouveau/gr/gm206: initial init+ctx code
  drm/nouveau/ce/gm206: enable support via gm204 code
  drm/nouveau/fifo/gm206: enable support via gm204 code
  drm/nouveau/gr/gm204: initial init+ctx code
  drm/nouveau: support for buffer moves via MaxwellDmaCopyA
  drm/nouveau/ce/gm204: initial support
  drm/nouveau: add support for gm20x fifo channels
  drm/nouveau/fifo/gm204: initial support
  drm/nouveau/gr/gk104-: prevent reading non-existent regs in intr handler
  drm/nouveau/gr/gm107: very slightly demagic part of attrib cb setup
  drm/nouveau/gr/gk104-: correct crop/zrop num_active_fbps setting
  drm/nouveau/gr/gf100-: add symbolic names for classes
  drm/nouveau/gr/gm107: support tpc "strand" ctxsw in gpccs ucode
  drm/nouveau/gr/gf100-: support mmio access with gpc offset from gpccs ucode
  drm/nouveau/gr: fix engine name, cosmetic search+replace mistake
  drm/nouveau/pmu/gk20a: add some missing statics
  drm/nouveau/platform: fix probe error path
  drm/nouveau/platform: release IOMMU's mm upon exit
  drm/nouveau/gr/gk104-gk20a: call pmu to disable any power-gating before ctor()
  ...

9 years agodrm/i915: Dont enable CS_PARSER_ERROR interrupts at all
Daniel Vetter [Wed, 1 Apr 2015 11:43:46 +0000 (13:43 +0200)]
drm/i915: Dont enable CS_PARSER_ERROR interrupts at all

We stopped handling them in

commit aaecdf611a05cac26a94713bad25297e60225c29
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Nov 4 15:52:22 2014 +0100

    drm/i915: Stop gathering error states for CS error interrupts

but just clearing is apparently not enough: A sufficiently dead gpu
left behind by firmware (*cough* coreboot *cough*) can keep the gpu in
an endless loop of such interrupts, eventually leading to the nmi
firing. And definitely to what looks like a machine hang.

Since we don't even enable these interrupts on gen5+ let's do the same
on earlier platforms.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93171
Tested-by: Mono <mono-for-kernel-org@donderklumpen.de>
Tested-by: info@gluglug.org.uk
Cc: stable@vger.kernel.org
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
9 years agodrm/i915: Move drm_framebuffer_unreference out of struct_mutex for takeover
Tvrtko Ursulin [Mon, 13 Apr 2015 15:03:03 +0000 (16:03 +0100)]
drm/i915: Move drm_framebuffer_unreference out of struct_mutex for takeover

intel_user_framebuffer_destroy() requires the struct_mutex for its
object bookkeeping, so this means that all calls to
drm_framebuffer_unreference must be held without that lock.

This is a simplified version of the identically named patch by Chris Wilson.

    Regression from commit ab8d66752a9c28cd6c94fa173feacdfc1554aa03
    Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Date:   Mon Feb 2 15:44:15 2015 +0000

        drm/i915: Track old framebuffer instead of object

v2: Bikeshedding.

References: https://bugs.freedesktop.org/show_bug.cgi?id=89166
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
9 years agodrm: fix trivial typo mistake
John Hunter [Tue, 14 Apr 2015 09:07:22 +0000 (17:07 +0800)]
drm: fix trivial typo mistake

Signed-off-by: John Hunter <zhjwpku@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm: Make integer overflow checking cover universal cursor updates (v2)
Matt Roper [Mon, 13 Apr 2015 18:06:13 +0000 (11:06 -0700)]
drm: Make integer overflow checking cover universal cursor updates (v2)

Our legacy SetPlane updates perform integer overflow checking on a
plane's destination rectangle in drm_mode_setplane(), and atomic updates
handled as part of a drm_atomic_state transaction do the same checking
in drm_atomic_plane_check().  However legacy cursor updates that get
routed through universal plane interfaces may bypass this overflow
checking if the driver's .update_plane is serviced by the transitional
plane helpers rather than the full atomic plane helpers.

Move the check for destination rectangle integer overflow from the
drm_mode_setplane() to __setplane_internal() so that it also covers
cursor operations.

This fixes an issue first noticed with i915 commit:

        commit ff42e093e9c9c17a6e1d6aab24875a36795f926e
        Author: Daniel Vetter <daniel.vetter@ffwll.ch>
        Date:   Mon Mar 2 16:35:20 2015 +0100

            Revert "drm/i915: Switch planes from transitional helpers to full
            atomic helpers"

The above revert switched us from full atomic helpers back to the
transitional helpers, and in doing so we lost the overflow checking here
for universal cursor updates.  Even though such extreme cursor positions
are unlikely to actually happen in the wild, we still don't want there
to be a change of behavior when drivers switch from transitional helpers
to full helpers.

v2: Move check from setplane ioctl to setplane_internal rather than
    adding an additional copy of the checks to the transitional plane
    helpers.  (Daniel)

Cc: Daniel Vetter <daniel@ffwll.ch>
Testcase: igt/kms_cursor_crc
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84269
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/nouveau/bios: fix fetching from acpi on certain systems
Jan Vesely [Thu, 9 Apr 2015 01:34:36 +0000 (21:34 -0400)]
drm/nouveau/bios: fix fetching from acpi on certain systems

nvbios_extend() returns 1 to indicate "extended the array" and 0 to
indicate the array is already big enough.  This is used by the core
shadowing code to prevent re-fetching chunks of the image that have
already been shadowed.

The ACPI fetching code may possibly need to extend this further due
to requiring fetches to happen in 4KiB chunks.

Under certain circumstances (that happen if the total image size is
a multiple of 4KiB), the memory allocated to store the shadow will
already be big enough, causing the ACPI code's nvbios_extend() call
to return 0, which is misinterpreted as a failure.

The fix is simple, accept >= 0 as a successful condition here.  The
core will have already made sure that we're not re-fetching data we
already have.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89047

v2 (Ben Skeggs):
- dropped hunk which would cause unnecessary re-fetching
- more descriptive explanation

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gm206: initial init+ctx code
Ben Skeggs [Tue, 14 Apr 2015 02:06:44 +0000 (12:06 +1000)]
drm/nouveau/gr/gm206: initial init+ctx code

Uncertain whether the GPC pack change is due to a newer driver version,
or a legitimate difference from GM204.  My GM204 has broken vram, so
can't currently try a newer binary driver on it to confirm.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ce/gm206: enable support via gm204 code
Ben Skeggs [Tue, 14 Apr 2015 01:45:29 +0000 (11:45 +1000)]
drm/nouveau/ce/gm206: enable support via gm204 code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fifo/gm206: enable support via gm204 code
Ben Skeggs [Tue, 14 Apr 2015 01:45:10 +0000 (11:45 +1000)]
drm/nouveau/fifo/gm206: enable support via gm204 code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gm204: initial init+ctx code
Ben Skeggs [Wed, 25 Mar 2015 23:28:34 +0000 (09:28 +1000)]
drm/nouveau/gr/gm204: initial init+ctx code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau: support for buffer moves via MaxwellDmaCopyA
Ben Skeggs [Tue, 14 Apr 2015 01:50:35 +0000 (11:50 +1000)]
drm/nouveau: support for buffer moves via MaxwellDmaCopyA

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/ce/gm204: initial support
Ben Skeggs [Wed, 11 Mar 2015 02:24:45 +0000 (12:24 +1000)]
drm/nouveau/ce/gm204: initial support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau: add support for gm20x fifo channels
Ben Skeggs [Tue, 14 Apr 2015 01:47:24 +0000 (11:47 +1000)]
drm/nouveau: add support for gm20x fifo channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fifo/gm204: initial support
Ben Skeggs [Wed, 11 Mar 2015 02:21:15 +0000 (12:21 +1000)]
drm/nouveau/fifo/gm204: initial support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gk104-: prevent reading non-existent regs in intr handler
Ben Skeggs [Mon, 13 Apr 2015 03:09:28 +0000 (13:09 +1000)]
drm/nouveau/gr/gk104-: prevent reading non-existent regs in intr handler

Under certain circumstances the trapped address will contain subc 7,
which GK104 GR doesn't have anymore.

Notice this case to avoid causing additional priv ring faults.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gm107: very slightly demagic part of attrib cb setup
Ben Skeggs [Thu, 26 Mar 2015 05:44:04 +0000 (15:44 +1000)]
drm/nouveau/gr/gm107: very slightly demagic part of attrib cb setup

No idea if "3" is a constant or derived from something else, but the
value is unchanged in the limited traces of gm107/gm204 I have here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gk104-: correct crop/zrop num_active_fbps setting
Ben Skeggs [Thu, 26 Mar 2015 03:26:20 +0000 (13:26 +1000)]
drm/nouveau/gr/gk104-: correct crop/zrop num_active_fbps setting

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gf100-: add symbolic names for classes
Ben Skeggs [Wed, 25 Mar 2015 23:18:32 +0000 (09:18 +1000)]
drm/nouveau/gr/gf100-: add symbolic names for classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gm107: support tpc "strand" ctxsw in gpccs ucode
Ben Skeggs [Mon, 9 Mar 2015 23:20:07 +0000 (09:20 +1000)]
drm/nouveau/gr/gm107: support tpc "strand" ctxsw in gpccs ucode

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gf100-: support mmio access with gpc offset from gpccs ucode
Ben Skeggs [Tue, 7 Apr 2015 08:54:40 +0000 (18:54 +1000)]
drm/nouveau/gr/gf100-: support mmio access with gpc offset from gpccs ucode

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr: fix engine name, cosmetic search+replace mistake
Ben Skeggs [Mon, 23 Mar 2015 03:49:43 +0000 (13:49 +1000)]
drm/nouveau/gr: fix engine name, cosmetic search+replace mistake

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pmu/gk20a: add some missing statics
Alexandre Courbot [Fri, 20 Mar 2015 10:41:06 +0000 (19:41 +0900)]
drm/nouveau/pmu/gk20a: add some missing statics

Make static a few functions and structures that should be.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/platform: fix probe error path
Alexandre Courbot [Fri, 20 Mar 2015 10:41:05 +0000 (19:41 +0900)]
drm/nouveau/platform: fix probe error path

A "return 0" found its way in the middle of the error path of
nouveau_platform_probe(), remove it as it will make the kernel crash if
we try to unload the module afterwards.

While we are at it, also remove the IOMMU domain if it has been created,
as we should.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/platform: release IOMMU's mm upon exit
Alexandre Courbot [Fri, 20 Mar 2015 10:41:04 +0000 (19:41 +0900)]
drm/nouveau/platform: release IOMMU's mm upon exit

nvkm_mm_fini() was not called when exiting the driver, resulting in a
memory leak. Fix this.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gk104-gk20a: call pmu to disable any power-gating before ctor()
Ben Skeggs [Fri, 20 Mar 2015 05:38:23 +0000 (15:38 +1000)]
drm/nouveau/gr/gk104-gk20a: call pmu to disable any power-gating before ctor()

On some of these chipsets, reading NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK
can trigger a PRI fault and return an error code instead of a TPC mask,
unless PGOB has been disabled first.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pmu/gk208: implement gr power-up magic with gk110_pmu_pgob()
Ben Skeggs [Fri, 20 Mar 2015 05:28:52 +0000 (15:28 +1000)]
drm/nouveau/pmu/gk208: implement gr power-up magic with gk110_pmu_pgob()

Before we moved gk110's implementation of this to pmu, the functions were
identical.  This commit just switches GK208 to use the new (more complete)
implementation of the power-up sequence.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pmu/gk110: implement gr power-up magic like PGOB on earlier chips
Ben Skeggs [Fri, 20 Mar 2015 05:20:17 +0000 (15:20 +1000)]
drm/nouveau/pmu/gk110: implement gr power-up magic like PGOB on earlier chips

Turns out the PTHERM part of this dance is bracketed by the same PMU
fiddling that occurs on GK104/6, let's assume it's also PGOB.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pbus/hwsq: Make code size u16
Roy Spliet [Thu, 12 Mar 2015 19:43:23 +0000 (20:43 +0100)]
drm/nouveau/pbus/hwsq: Make code size u16

So we can actually use the full 512 byte code space

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/pbus/hwsq: Support strided register writes
Roy Spliet [Thu, 12 Mar 2015 19:43:22 +0000 (20:43 +0100)]
drm/nouveau/pbus/hwsq: Support strided register writes

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/instmem/gk20a: fix crash during error path
Alexandre Courbot [Tue, 10 Mar 2015 06:46:08 +0000 (15:46 +0900)]
drm/nouveau/instmem/gk20a: fix crash during error path

If a memory allocation fails when using the DMA allocator,
gk20a_instobj_dtor_dma() will be called on the failed instmem object.
At this time, node->handle might not be NULL despite the call to
dma_alloc_attrs() having failed. node->cpuaddr is the right member to
check for such a failure, so use it instead.

Reported-by: Vince Hsu <vinceh@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/disp/gf110-: fix base channel update debug/error output
Ben Skeggs [Mon, 9 Mar 2015 23:13:45 +0000 (09:13 +1000)]
drm/nouveau/disp/gf110-: fix base channel update debug/error output

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/disp/nv50-: fix push buffers in vram
Ben Skeggs [Mon, 9 Mar 2015 23:13:08 +0000 (09:13 +1000)]
drm/nouveau/disp/nv50-: fix push buffers in vram

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau: bump driver patchlevel for coherent flag
Ben Skeggs [Wed, 4 Mar 2015 00:17:08 +0000 (10:17 +1000)]
drm/nouveau: bump driver patchlevel for coherent flag

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gem: allow user-space to specify an object should be coherent
Alexandre Courbot [Thu, 26 Feb 2015 03:44:51 +0000 (12:44 +0900)]
drm/nouveau/gem: allow user-space to specify an object should be coherent

User-space use mappable BOs notably for fences, and expects that a
value update by the GPU will be immediatly visible through the
user-space mapping.

ARM has a property that may prevent this from happening though: memory
can be mapped multiple times only if the different mappings share the
same caching properties. However all the lowmem memory is already
identity-mapped into the kernel with cache enabled, so when user-space
requests an uncached mapping, we actually get an "undefined caching
policy" one and this has strange side-effects described on Freedesktop
bug 86690.

To prevent this from happening, allow user-space to explicitly specify
which objects should be coherent, and create such objects with the
TTM_PL_FLAG_UNCACHED flag. This will make TTM allocate memory using the
DMA API, which will fix the identify mapping and allow us to safely map
the objects to user-space uncached.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/instmem/gk20a: add IOMMU support
Alexandre Courbot [Fri, 20 Feb 2015 09:23:04 +0000 (18:23 +0900)]
drm/nouveau/instmem/gk20a: add IOMMU support

Let GK20A's instmem take advantage of the IOMMU if it is present. Having
an IOMMU means that instmem is no longer allocated using the DMA API,
but instead obtained through page_alloc and made contiguous to the GPU
by IOMMU mappings.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/platform: probe IOMMU if present
Alexandre Courbot [Fri, 20 Feb 2015 09:23:03 +0000 (18:23 +0900)]
drm/nouveau/platform: probe IOMMU if present

Tegra SoCs have an IOMMU that can be used to present non-contiguous
physical memory as contiguous to the GPU and maximize the use of large
pages in the GPU MMU, leading to performance gains. This patch adds
support for probing such a IOMMU if present and make its properties
available in the nouveau_platform_gpu structure so subsystems can take
advantage of it.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/instmem/gk20a: use DMA attributes
Alexandre Courbot [Fri, 20 Feb 2015 09:23:02 +0000 (18:23 +0900)]
drm/nouveau/instmem/gk20a: use DMA attributes

instmem for GK20A is allocated using dma_alloc_coherent(), which
provides us with a coherent CPU mapping that we never use because
instmem objects are accessed through PRAMIN. Switch to
dma_alloc_attrs() which gives us the option to dismiss that CPU mapping
and free up some CPU virtual space.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gk20a: remove RAM device
Alexandre Courbot [Fri, 20 Feb 2015 09:23:01 +0000 (18:23 +0900)]
drm/nouveau/gk20a: remove RAM device

Now that Nouveau can operate even when there is no RAM device, remove
the dummy one used by GK20A.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/instmem/gk20a: move memory allocation to instmem
Alexandre Courbot [Fri, 20 Feb 2015 09:23:00 +0000 (18:23 +0900)]
drm/nouveau/instmem/gk20a: move memory allocation to instmem

GK20A does not have dedicated RAM, thus having a RAM device for it does
not make sense. Move the contiguous physical memory allocation to
instmem.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agomake RAM device optional
Alexandre Courbot [Fri, 20 Feb 2015 09:22:59 +0000 (18:22 +0900)]
make RAM device optional

Having a RAM device does not make sense for chips like GK20A which have
no dedicated video memory. The dummy RAM device that we used so far
works as a temporary band-aid, but in the longer term it is desirable
for the driver to be able to work without any kind of VRAM.

This patch adds a few conditionals in places where a RAM device was
assumed to be present and allows some more objects to be allocated from
the TT domain, allowing Nouveau to handle GPUs for which
pfb->ram == NULL.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/gr/gf100: Clear notify interrupt
Lauri Peltonen [Thu, 26 Feb 2015 04:16:48 +0000 (13:16 +0900)]
drm/nouveau/gr/gf100: Clear notify interrupt

Notify interrupt is only used for cyclestats. We can just clear it and
avoid an "unknown stat" error that gets printed to dmesg otherwise.

Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/graph/nvc0: Fix engine pointer retrieval
Lauri Peltonen [Tue, 17 Feb 2015 06:55:42 +0000 (15:55 +0900)]
drm/nouveau/graph/nvc0: Fix engine pointer retrieval

Other methods in this file suggest this is the correct way to retrieve
the engine pointer.

Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/devinit/nv04: change owner to int
Ben Skeggs [Sat, 31 Jan 2015 07:13:40 +0000 (17:13 +1000)]
drm/nouveau/devinit/nv04: change owner to int

We use -1 to mean "not read from hw yet"

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/mxm: indent an if statement
Dan Carpenter [Fri, 30 Jan 2015 08:27:49 +0000 (11:27 +0300)]
drm/nouveau/mxm: indent an if statement

This if statement is correct but it wasn't indented, so it looked like
some code was missing.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/nouveau/fuse/gm107: simplify the return logic
Martin Peres [Sun, 25 Jan 2015 19:35:44 +0000 (21:35 +0200)]
drm/nouveau/fuse/gm107: simplify the return logic

Spotted by coccinelle:
drivers/gpu/drm/nouveau/core/subdev/fuse/gm107.c:50:5-8: WARNING: end returns can be simpified

Signed-off-by: Martin Peres <martin.peres@free.fr>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9 years agodrm/radeon: allow creating overlapping userptrs
Christian König [Tue, 31 Mar 2015 15:37:00 +0000 (17:37 +0200)]
drm/radeon: allow creating overlapping userptrs

Similar to the Intel implementation, but instead of just falling back to a
global linear list when we have an overlapping userptr request we accumulate
all overlapping userptrs in a local list.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agodrm/radeon: add userptr config option
Christian König [Tue, 31 Mar 2015 15:36:59 +0000 (17:36 +0200)]
drm/radeon: add userptr config option

This allows selecting CONFIG_MMU_NOTIFIER if it isn't already selected.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agodrm: make crtc/encoder/connector/plane helper_private a const pointer
Jani Nikula [Mon, 13 Apr 2015 08:21:42 +0000 (11:21 +0300)]
drm: make crtc/encoder/connector/plane helper_private a const pointer

They're only used to store const pointers anyway. This helps to keep
Ville and the compiler happy.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/armada: constify struct drm_encoder_helper_funcs pointer
Jani Nikula [Mon, 13 Apr 2015 08:21:41 +0000 (11:21 +0300)]
drm/armada: constify struct drm_encoder_helper_funcs pointer

Not to be modified.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/radeon: constify more struct drm_*_helper funcs pointers
Jani Nikula [Mon, 13 Apr 2015 08:21:40 +0000 (11:21 +0300)]
drm/radeon: constify more struct drm_*_helper funcs pointers

Some non-const pointers were added since the last constification, fix
them.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/edid: add #defines for ELD versions
Jani Nikula [Mon, 13 Apr 2015 07:57:14 +0000 (10:57 +0300)]
drm/edid: add #defines for ELD versions

Add ELD versions according to HDA Specification v1.0a.

2 indicates version 2, which supports CEA_Ver 861D or below. Maximum
Baseline ELD size of 80 bytes (15 SAD count).

31 indicates an ELD that has been partially populated through
implementation specific mean of default programming before an external
graphics driver is loaded. Only the field that is called out as "canned"
field will be populated, and audio driver should ignore the non "canned"
field.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Allocate connector state together with the connectors
Ander Conselvan de Oliveira [Fri, 10 Apr 2015 07:59:10 +0000 (10:59 +0300)]
drm/i915: Allocate connector state together with the connectors

Connector states were being allocated in intel_setup_outputs() in loop
over all connectors. That meant hot-added connectors would have a NULL
state. Since the change to use a struct drm_atomic_state for the legacy
modeset, connector states are necessary for the i915 driver to function
properly, so that would lead to oopses.

Broken by

commit 944b0c76575753da5a332aab0a1d8c6df65a076b
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Fri Mar 20 16:18:07 2015 +0200

    drm/i915: Copy the staged connector config to the legacy atomic state

v2: Fix test for intel_connector_init() success in lvds and sdvo (PRTS)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reported-and-tested-by: Nicolas Kalkhof <nkalkhof@web.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
9 years agoMerge tag 'imx-drm-next-2015-03-31' of git://git.pengutronix.de/git/pza/linux into...
Dave Airlie [Mon, 13 Apr 2015 07:28:57 +0000 (17:28 +1000)]
Merge tag 'imx-drm-next-2015-03-31' of git://git.pengutronix.de/git/pza/linux into drm-next

imx-drm changes to use media bus formats and LDB drm_panel support

- Add media bus formats needed by imx-drm
- Switch to use media bus formats to describe the pixel format
  on the internal parallel bus between display interface and
  encoders
- Some preparations for TV Output via TVEv2 on i.MX5
- Add drm_panel support to the i.MX LVDS driver, allow to
  determine the bus pixel format from the panel descriptor.

* tag 'imx-drm-next-2015-03-31' of git://git.pengutronix.de/git/pza/linux:
  drm/imx: imx-ldb: allow to determine bus format from the connected panel
  drm/imx: imx-ldb: reset display clock input when disabling LVDS
  drm/imx: imx-ldb: add drm_panel support
  drm/imx: consolidate bus format variable names
  drm/imx: switch to use media bus formats
  Add RGB666_1X24_CPADHI media bus format
  Add YUV8_1X24 media bus format
  Add BGR888_1X24 and GBR888_1X24 media bus formats
  Add LVDS RGB media bus formats
  Add RGB444_1X12 and RGB565_1X16 media bus formats
  drm/imx: ipuv3-crtc: Allow to divide DI clock from TVEv2
  drm/imx: Add support for interlaced scanout

9 years agoMerge tag 'of-graph-drm-2015-04-08' of git://git.pengutronix.de/git/pza/linux into...
Dave Airlie [Mon, 13 Apr 2015 07:28:16 +0000 (17:28 +1000)]
Merge tag 'of-graph-drm-2015-04-08' of git://git.pengutronix.de/git/pza/linux into drm-next

drm: Use of-graph helpers to loop over endpoints

Convert all drm callers that use of_graph_get_next_endpoint to loop over
of-graph endpoints to the newly introduced for_each_endpoint_of_node
helper macro.

* tag 'of-graph-drm-2015-04-08' of git://git.pengutronix.de/git/pza/linux:
  drm/rockchip: use for_each_endpoint_of_node macro, drop endpoint reference on break
  drm/rcar-du: use for_each_endpoint_of_node macro
  drm/imx: use for_each_endpoint_of_node macro in imx_drm_encoder_get_mux_id
  drm: use for_each_endpoint_of_node macro in drm_of_find_possible_crtcs
  of: Explicitly include linux/types.h in of_graph.h
  dt-bindings: brcm: rationalize Broadcom documentation naming
  of/unittest: replace 'selftest' with 'unittest'
  Documentation: rename of_selftest.txt to of_unittest.txt
  Documentation: update the of_selftest.txt
  dt: OF_UNITTEST make dependency broken
  MAINTAINERS: Pantelis Antoniou device tree overlay maintainer
  of: Add of_graph_get_port_by_id function
  of: Add for_each_endpoint_of_node helper macro
  of: Decrement refcount of previous endpoint in of_graph_get_next_endpoint

9 years agoMerge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daein...
Dave Airlie [Mon, 13 Apr 2015 07:26:58 +0000 (17:26 +1000)]
Merge branch 'exynos-drm-next' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next

   This pull request contains just cleanup for atomic pageflip/modeset
   support, and some fixeups.

   We wanted to merge atomic pageflip/modeset feature support, new drivers
   - MIC and DECON for exynos5433 SoC - and relevant patches this time.
   However, I'd found that these features are not only safe enough
   but also aren't tested yet. So for them, I'd like to have enough times
   for the reviews.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: Fix FIMD buffer size calculation
  drm/exynos: Enable DP clock to fix display on Exynos5250 and other
  drm/exynos: fimd: check whether exynos_drm_crtc_create succeed or not
  drm/exynos: dsi: remove the empty mode_valid callback
  drm/exynos: add ratio calculation
  drm/exynos: use src_x and src_y instead of fb_x and fb_y
  drm/exynos: mixer: add 2x scaling to mixer_graph_buffer
  drm/exynos: remove superfluous error messages
  drm/exynos: fix typos in hdmi and mixer
  drm/exynos/ipp: Validate buffer enqueue requests
  drm/exynos: track vblank events on a per crtc basis
  drm/exynos: remove leftover functions declarations
  drm/exynos: remove exynos_plane_destroy()
  drm/exynos: make zpos property immutable
  drm/exynos: preset zpos value for overlay planes
  drm/exynos: remove struct *_win_data abstraction on planes
  drm/exynos: remove unused exynos_crtc->win_enable() callback
  drm/exynos: fimd: fix alpha setting for XR24 pixel format

9 years agodrm/exynos: Fix FIMD buffer size calculation
Daniel Stone [Wed, 8 Apr 2015 15:39:06 +0000 (16:39 +0100)]
drm/exynos: Fix FIMD buffer size calculation

Commit adacb228d72b ("drm: Exynos: Respect framebuffer pitch for
FIMD/Mixer") fixed the buffer size calculation by using the FB
pitch value but later commit 26b9c2813ede1 ("drm/exynos: remove
struct *_win_data abstraction on planes") added a regression so
fix the buffer size calculation again.

Tested on Chromebook Snow / Peach Pit.

Fixes: 26b9c2813ede1 ("drm/exynos: remove struct *_win_data abstraction on planes")
Signed-off-by: Daniel Stone <daniels@collabora.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: Enable DP clock to fix display on Exynos5250 and other
Krzysztof Kozlowski [Tue, 7 Apr 2015 13:28:50 +0000 (22:28 +0900)]
drm/exynos: Enable DP clock to fix display on Exynos5250 and other

After adding display power domain for Exynos5250 in commit
2d2c9a8d0a4f ("ARM: dts: add display power domain for exynos5250") the
display on Chromebook Snow and others stopped working after boot.

The reason for this suggested Andrzej Hajda: the DP clock was disabled.
This clock is required by Display Port and is enabled by bootloader.
However when FIMD driver probing was deferred, the display power domain
was turned off. This effectively reset the value of DP clock enable
register.

When exynos-dp is later probed, the clock is not enabled and display is
not properly configured:

exynos-dp 145b0000.dp-controller: Timeout of video streamclk ok
exynos-dp 145b0000.dp-controller: unable to config video

Fixes: 2d2c9a8d0a4f ("ARM: dts: add display power domain for exynos5250")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: check whether exynos_drm_crtc_create succeed or not
Hyungwon Hwang [Tue, 7 Apr 2015 13:19:43 +0000 (22:19 +0900)]
drm/exynos: fimd: check whether exynos_drm_crtc_create succeed or not

>From the commit "drm/exynos: fix the execution order in FIMD
initialization" (598285bfdce46d7c47632a2ba4b980f60be4a677), the error
checking code is removed improperly. This patch fix the regression.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: dsi: remove the empty mode_valid callback
Hyungwon Hwang [Thu, 2 Apr 2015 09:52:20 +0000 (18:52 +0900)]
drm/exynos: dsi: remove the empty mode_valid callback

Because the helper function which calls this callback checks whether
it is registered or not. It is not necessary if it does nothing.
So it would be better to remove the function for clarity.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: add ratio calculation
Joonyoung Shim [Tue, 7 Apr 2015 06:59:39 +0000 (15:59 +0900)]
drm/exynos: add ratio calculation

Calculation ratio from exynos_drm plane codes, then each hw drivers can
use it without extra operation. Also this fixes width and height of
source used for actual crtc shown via screen.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: use src_x and src_y instead of fb_x and fb_y
Joonyoung Shim [Tue, 7 Apr 2015 06:59:38 +0000 (15:59 +0900)]
drm/exynos: use src_x and src_y instead of fb_x and fb_y

It's more reasonable to use src_x and src_y to represent source as
counterpart of destination(crtc). Already we are using src_width and
src_height for width and height of source.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: mixer: add 2x scaling to mixer_graph_buffer
Tobias Jakobi [Mon, 6 Apr 2015 23:14:52 +0000 (01:14 +0200)]
drm/exynos: mixer: add 2x scaling to mixer_graph_buffer

While the VP (video processor) supports arbitrary scaling
of its input, the mixer just supports a simple 2x (line
doubling) scaling. Expose this functionality and exit
early when an unsupported scaling configuration is
encountered.

This was tested with modetest's DRM plane test (from
the libdrm test suite) on an Odroid-X2 (Exynos4412).

v2: Put if- and return-statement on different lines.

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove superfluous error messages
Tobias Jakobi [Mon, 6 Apr 2015 23:14:51 +0000 (01:14 +0200)]
drm/exynos: remove superfluous error messages

The messages are redundant since 'check_fb_gem_memory_type'
already prints out exactly the same string when it fails.

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fix typos in hdmi and mixer
Tobias Jakobi [Mon, 6 Apr 2015 23:14:50 +0000 (01:14 +0200)]
drm/exynos: fix typos in hdmi and mixer

Use the correct spelling for 'progressive'.

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos/ipp: Validate buffer enqueue requests
Beata Michalska [Wed, 4 Mar 2015 14:02:49 +0000 (15:02 +0100)]
drm/exynos/ipp: Validate buffer enqueue requests

As for now there is no validation of incoming buffer
enqueue request as far as the gem buffers are being
concerned. This might lead to some undesired cases
when the driver tries to operate on invalid buffers
(wiht no valid gem object handle i.e.).
Add some basic checks to rule out those potential issues.

Signed-off-by: Beata Michalska <b.michalska@samsung.com>
[mszyprow: rebased onto v4.0-rc1 and adapted to recent ipp changes]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: track vblank events on a per crtc basis
Mandeep Singh Baines [Wed, 1 Apr 2015 16:02:12 +0000 (13:02 -0300)]
drm/exynos: track vblank events on a per crtc basis

The goal of the change is to make sure we send the vblank event on the
current vblank. My hope is to fix any races that might be causing flicker.
After this change I only see a flicker in the transition plymouth and
X11.

Simplified the code by tracking vblank events on a per-crtc basis. This
allowed me to remove all error paths from the callback. It also allowed
me to remove the vblank wait from the callback.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove leftover functions declarations
Gustavo Padovan [Wed, 1 Apr 2015 16:02:11 +0000 (13:02 -0300)]
drm/exynos: remove leftover functions declarations

These functions were already removed by previous cleanup work, but these
ones were left behind.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove exynos_plane_destroy()
Gustavo Padovan [Wed, 1 Apr 2015 16:02:10 +0000 (13:02 -0300)]
drm/exynos: remove exynos_plane_destroy()

The .destroy() callback for exynos can be replaced by drm_plane_cleanup().
The only extra operation on exynos_plane_destroy() was a call to
exynos_plane_disable() but the plane is already disabled by a earlier call
to drm_framebuffer_remove().

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: make zpos property immutable
Gustavo Padovan [Wed, 1 Apr 2015 16:02:09 +0000 (13:02 -0300)]
drm/exynos: make zpos property immutable

We already set each plane zpos at init, after that changes to zpos are
not expected. This patch turns zpos into a read-only property so now it is
impossible to set zpos.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: preset zpos value for overlay planes
Gustavo Padovan [Fri, 3 Apr 2015 12:05:52 +0000 (21:05 +0900)]
drm/exynos: preset zpos value for overlay planes

Usually userspace don't want to have two overlay planes on the same zpos
so this change assign a different zpos for each plane. Before this change
a zpos of value zero was created for all planes so the userspace had to
set up the zpos of every plane it wanted to use.

Also all places that were storing zpos positions are now unsigned int.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove struct *_win_data abstraction on planes
Gustavo Padovan [Fri, 3 Apr 2015 12:03:40 +0000 (21:03 +0900)]
drm/exynos: remove struct *_win_data abstraction on planes

struct {fimd,mixer,vidi}_win_data was just keeping the same data
as struct exynos_drm_plane thus get ride of it and use exynos_drm_plane
directly.

It changes how planes are created and remove .win_mode_set() callback
that was only filling all *_win_data structs.

v2: check for return of exynos_plane_init()

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: remove unused exynos_crtc->win_enable() callback
Gustavo Padovan [Wed, 1 Apr 2015 16:02:06 +0000 (13:02 -0300)]
drm/exynos: remove unused exynos_crtc->win_enable() callback

None of the exynos crtc drivers implements win_enable() so remove it for
better clarity of the code.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: fimd: fix alpha setting for XR24 pixel format
Gustavo Padovan [Wed, 1 Apr 2015 16:02:05 +0000 (13:02 -0300)]
drm/exynos: fimd: fix alpha setting for XR24 pixel format

XR24 planes were not shown properly, so now set the right registers
to correctly enable displaying these planes.

It also moves the alpha register settings to fimd_win_set_pixfmt()
to keep all pixel format stuff together.

v2: remove leftover var alpha

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros
Ander Conselvan de Oliveira [Fri, 10 Apr 2015 11:58:39 +0000 (14:58 +0300)]
drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros

This saves some typing whenever a iteration over all the connector,
crtc or plane states in the atomic state is written, which happens
quite often.

Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/chv: Remove DPIO force latency causing interpair skew issue
Clint Taylor [Thu, 9 Apr 2015 20:42:06 +0000 (13:42 -0700)]
drm/i915/chv: Remove DPIO force latency causing interpair skew issue

Latest version of the "CHV DPIO programming notes" no longer requires writes
to TX DW 11 to fix a +2UI interpair skew issue. The current code from
April 2014 was actually causing additional skew issues between all
TMDS pairs.

ver2: added same treatment to intel_dp.c based on Ville's testing.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
9 years agodrm/i915: Don't cancel DRRS worker synchronously for flush/invalidate
Daniel Vetter [Thu, 9 Apr 2015 14:44:16 +0000 (16:44 +0200)]
drm/i915: Don't cancel DRRS worker synchronously for flush/invalidate

It's not needed since the worker rechecks that it didn't race. We only
need to cancel synchronously after disabling drrs to make sure the
worker really is gone (e.g. for driver unload). But for normal
operation the stall is just wasted time.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Vandana Kannan <vandana.kannan@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
9 years agodrm/i915: Fix locking in DRRS flush/invalidate hooks
Daniel Vetter [Thu, 9 Apr 2015 14:44:15 +0000 (16:44 +0200)]
drm/i915: Fix locking in DRRS flush/invalidate hooks

We must acquire the mutex before we can check drrs.dp, otherwise
someone might sneak in with a modeset, clear the pointer after we've
checked it and then the code will Oops.

This issue has been introduced in

commit a93fad0f7fb8a3ff12e8814b630648f6d187954c
Author: Vandana Kannan <vandana.kannan@intel.com>
Date:   Sat Jan 10 02:25:59 2015 +0530

    drm/i915: DRRS calls based on frontbuffer

v2: Don't blow up on uninitialized mutex and work item by checking
whether DRRS is support or not first. Also unconditionally initialize
the mutex/work item to avoid future trouble.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Vandana Kannan <vandana.kannan@intel.com>
Cc: stable@vger.kernel.org (4.0+ only)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
9 years agodrm/radeon: add video usability info support for VCE
Leo Liu [Tue, 31 Mar 2015 15:19:50 +0000 (11:19 -0400)]
drm/radeon: add video usability info support for VCE

v2: bump version to make sure userspace backward compatibility

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9 years agoMerge tag 'v4.0-rc7' into drm-next
Dave Airlie [Wed, 8 Apr 2015 21:48:27 +0000 (07:48 +1000)]
Merge tag 'v4.0-rc7' into drm-next

Linux 4.0-rc7

Requested by Alex for fixes -next needs.

Conflicts:
drivers/gpu/drm/i915/intel_sprite.c

9 years agodrm/rockchip: use for_each_endpoint_of_node macro, drop endpoint reference on break
Philipp Zabel [Sun, 21 Dec 2014 14:38:02 +0000 (15:38 +0100)]
drm/rockchip: use for_each_endpoint_of_node macro, drop endpoint reference on break

Using the for_each_... macro should make the code a bit shorter and
easier to read. Also, when breaking out of the loop, the endpoint node
reference count needs to be decremented.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
9 years agodrm/rcar-du: use for_each_endpoint_of_node macro
Philipp Zabel [Mon, 22 Dec 2014 10:46:40 +0000 (11:46 +0100)]
drm/rcar-du: use for_each_endpoint_of_node macro

Using the for_each_... macro should make the code a bit shorter and
easier to read.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 years agodrm/imx: use for_each_endpoint_of_node macro in imx_drm_encoder_get_mux_id
Philipp Zabel [Thu, 3 Jul 2014 21:07:49 +0000 (23:07 +0200)]
drm/imx: use for_each_endpoint_of_node macro in imx_drm_encoder_get_mux_id

Using the for_each_... macro should make the code bit shorter and
easier to read. This patch also properly decrements the endpoint node
reference count before returning out of the loop.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
9 years agodrm: use for_each_endpoint_of_node macro in drm_of_find_possible_crtcs
Philipp Zabel [Thu, 3 Jul 2014 20:59:51 +0000 (22:59 +0200)]
drm: use for_each_endpoint_of_node macro in drm_of_find_possible_crtcs

Using the for_each_... macro should make the code a bit shorter and
easier to read.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 years agoMerge tag 'imx-drm-fixes-2015-03-31' of git://git.pengutronix.de/git/pza/linux into...
Dave Airlie [Wed, 8 Apr 2015 01:19:24 +0000 (11:19 +1000)]
Merge tag 'imx-drm-fixes-2015-03-31' of git://git.pengutronix.de/git/pza/linux into drm-next

imx-drm limit fixes

Fix IPU IC downscaler to its hardware limitation of 4:1 and the
IPU DI pixel clock divider integer part to 8-bit.

* tag 'imx-drm-fixes-2015-03-31' of git://git.pengutronix.de/git/pza/linux:
  gpu: ipu-v3: turns out the IPU can only downsize 4:1
  gpu: ipu-v3: limit pixel clock divider to 8-bits
  drm/radeon: programm the VCE fw BAR as well
  drm/radeon: always dump the ring content if it's available
  radeon: Do not directly dereference pointers to BIOS area.
  drm/radeon/dpm: fix 120hz handling harder

9 years agoMerge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm...
Dave Airlie [Wed, 8 Apr 2015 01:14:40 +0000 (11:14 +1000)]
Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next

1) support for "stolen mem" for splash-screen take-over
2) additional hdmi pixel clks
3) various pipe flush related fixes
4) support for snapdragon 410 (8x16)
5) support for DSI and dual-DSI

It includes one small patch to export tile-group functions (which was ack'd
by you), as these are used to explain to userspace dual-dsi configurations
(with left and right tile).

* 'msm-next' of git://people.freedesktop.org/~robclark/linux: (24 commits)
  drm/msm/mdp5: Enable DSI connector in msm drm driver
  drm/msm: Initial add DSI connector support
  drm/msm: Add split display interface
  drm/msm/mdp5: Move *_modeset_init out of construct_encoder function
  drm: export tile-group functions
  drm/msm/mdp5: Remove CTL flush dummy bits
  drm/msm/mdp5: Update headers (add CTL flush bits)
  drm/msm/mdp5: Add hardware configuration for msm8x16
  drm/msm/mdp5: Get SMP client list from mdp5_cfg
  drm/msm/mdp5: Update headers (remove enum mdp5_client_id)
  drm/msm/mdp5: Separate MDP5 domain from MDSS domain
  drm/msm/mdp5: Update headers (introduce MDP5 domain)
  drm/msm/dsi: Update generated DSI header file
  drm/msm/mdp5: Fix PIPE source image size settings
  drm/msm/mdp5: Update generated mdp5 header file with DSI support
  drm/msm/mdp5: Add pingpong entry to mdp5 config table
  drm/msm/mdp5: Make the intf connection in config module
  drm/msm/mdp5: Add START signal to kick off certain pipelines
  drm/msm/mdp5: Enhance operation mode for pipeline configuration
  drm/msm/mdp5: Update generated header files
  ...

9 years agoMerge tag 'drm/panel/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Wed, 8 Apr 2015 01:14:10 +0000 (11:14 +1000)]
Merge tag 'drm/panel/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/panel: Changes for v4.1-rc1

This set of changes adds support for a whole bunch of new panels, mostly
simple ones. There's now also support for panels to provide display
timings rather than fixed modes, which should allow panels to work with
a larger number of display drivers. Eventually drivers should migrate to
this new interface and the fixed modes removed from panels.

There are also a couple of sparse fixes for the PS8622 and PS8625 bridge
drivers.

* tag 'drm/panel/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/panel: Add support for Ampire AM-800480R3TMQW-A1H 800x480 7" panel
  of: Add vendor prefix for Ampire Co., Ltd.
  drm/panel: Add display timing for HannStar HSD070PWW1
  drm/panel: simple: Add display timing support
  drm/panel: Add display timing support
  drm/panel: Add support for OrtusTech COM43H4M85ULC panel
  of: Add vendor prefix for Ortus Technology Co., Ltd.
  drm/panel: Add bus format for Giantplus GPG482739QS5 panel
  drm/panel: simple: Add support for AUO b101ean01 panel
  drm/panel: simple: Add support for Innolux ZJ070NA-01P
  drm/panel: simple: Add support for Innolux AT043TN24
  drm/panel: simple: Add support for Shelly SCA07010-BFN-LNN
  drm/panel: simple: Add support for Samsung LTN140AT29 panel
  drm: Remove unused DRM_MODE_OBJECT_BRIDGE
  drm/bridge: ptn3460: Fix sparse warnings
  drm/bridge: ps8622: Fix sparse warnings
  drm/bridge: Add I2C based driver for ps8622/ps8625 bridge

9 years agoMerge tag 'drm/tegra/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Wed, 8 Apr 2015 01:13:06 +0000 (11:13 +1000)]
Merge tag 'drm/tegra/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v4.1-rc1

Perhaps the most noteworthy change in this set is the implementation of
a hardware VBLANK counter using host1x syncpoints. The SOR registers can
now be dumped via debugfs, which can be useful while debugging. The IOVA
address space maintained by the driver can also be dumped via debugfs.

Other than than, these changes are mostly cleanup work, such as making
register names more consistent or removing unused code (that was left
over after the atomic mode-setting conversion). There's also a fix for
eDP that makes the driver cope with firmware that already initialized
the display (such as the firmware on the Tegra-based Chromebooks).

* tag 'drm/tegra/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: sor: Reset during initialization
  drm/tegra: gem: Return 64-bit offset for mmap(2)
  drm/tegra: hdmi: Name register fields consistently
  drm/tegra: hdmi: Resets are synchronous
  drm/tegra: dc: Document tegra_dc_state_setup_clock()
  drm/tegra: dc: Remove unused callbacks
  drm/tegra: dc: Remove unused function
  drm/tegra: dc: Use base atomic state helpers
  drm/atomic: Add helpers for state-subclassing drivers
  drm/tegra: dc: Implement hardware VBLANK counter
  gpu: host1x: Export host1x_syncpt_read()
  drm/tegra: sor: Dump registers via debugfs
  drm/tegra: sor: Registers are 32-bit
  drm/tegra: Provide debugfs file for the IOVA space
  drm/tegra: dc: Check for valid parent clock

9 years agoMerge tag 'omapdrm-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux...
Dave Airlie [Wed, 8 Apr 2015 01:11:48 +0000 (11:11 +1000)]
Merge tag 'omapdrm-4.1' of git://git./linux/kernel/git/tomba/linux into drm-next

omapdrm changes for 4.1

* universal plane support
* refactoring to prepare work atomic modesetting work
* a lot of small fixes

* tag 'omapdrm-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (36 commits)
  drm/omap: tiler: add hibernation callback
  drm/omap: add hibernation callbacks
  drm/omap: keep ref to old_fb
  drm/omap: fix race conditon in DMM
  drm/omap: fix race condition with dev->obj_list
  drm/omap: do not use BUG_ON(!spin_is_locked(x))
  drm/omap: only ignore DIGIT SYNC LOST for TV output
  drm/omap: fix race with error_irq
  drm/omap: use DRM_ERROR_RATELIMITED() for error irqs
  drm/omap: stop connector polling during suspend
  drm/omap: remove dummy PM functions
  drm/omap: tiler: fix race condition with engine->async
  drm/omap: fix plane's channel selection
  drm/omap: fix TILER on OMAP5
  drm/omap: handle incompatible buffer stride and pixel size
  drm/omap: fix error handling in omap_framebuffer_create()
  drm/omap: fix operation without fbdev
  drm/omap: add a comment why locking is missing
  drm/omap: add pin refcounting to omap_framebuffer
  drm/omap: clear omap_obj->paddr in omap_gem_put_paddr()
  ...

9 years agoMerge branch 'drm-next0401' of git://github.com/markyzq/kernel-drm-rockchip into...
Dave Airlie [Wed, 8 Apr 2015 01:10:56 +0000 (11:10 +1000)]
Merge branch 'drm-next0401' of git://github.com/markyzq/kernel-drm-rockchip into drm-next

   These are based on drm-next branch, fix some drm/rockchip problem.
   Please pull them.

* 'drm-next0401' of git://github.com/markyzq/kernel-drm-rockchip:
  drm/rockchip: vop: add vop power domain support
  drm: rockchip: Turn off VT switching on suspend
  drm/rockchip: register all connectors after bind
  drm/rockchip: fix clk enable disable mismatch in vop_crtc_mode_set

9 years agodrm: Use kref_put_mutex in drm_gem_object_unreference_unlocked
Maarten Lankhorst [Tue, 7 Apr 2015 13:56:07 +0000 (15:56 +0200)]
drm: Use kref_put_mutex in drm_gem_object_unreference_unlocked

If kref_put_mutex returns true then the caller or the put function is responsible
for unlocking the mutex. The usual pattern assumes that the free
callback unlocks the mutex, but since that is shared with the locked
variant we need to explicitly unlock here.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/drm: constify all struct drm_*_helper funcs pointers
Jani Nikula [Wed, 11 Mar 2015 09:51:06 +0000 (11:51 +0200)]
drm/drm: constify all struct drm_*_helper funcs pointers

They are not to be modified.

Generated using the semantic patch:

@@
@@
(
  const struct drm_crtc_helper_funcs *
|
- struct drm_crtc_helper_funcs *
+ const struct drm_crtc_helper_funcs *
)

@@
@@
(
  const struct drm_encoder_helper_funcs *
|
- struct drm_encoder_helper_funcs *
+ const struct drm_encoder_helper_funcs *
)

@@
@@
(
  const struct drm_connector_helper_funcs *
|
- struct drm_connector_helper_funcs *
+ const struct drm_connector_helper_funcs *
)

@@
@@
(
  const struct drm_plane_helper_funcs *
|
- struct drm_plane_helper_funcs *
+ const struct drm_plane_helper_funcs *
)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/qxl: constify all struct drm_*_helper funcs pointers
Jani Nikula [Wed, 11 Mar 2015 09:51:05 +0000 (11:51 +0200)]
drm/qxl: constify all struct drm_*_helper funcs pointers

They are not to be modified.

Generated using the semantic patch:

@@
@@
(
  const struct drm_crtc_helper_funcs *
|
- struct drm_crtc_helper_funcs *
+ const struct drm_crtc_helper_funcs *
)

@@
@@
(
  const struct drm_encoder_helper_funcs *
|
- struct drm_encoder_helper_funcs *
+ const struct drm_encoder_helper_funcs *
)

@@
@@
(
  const struct drm_connector_helper_funcs *
|
- struct drm_connector_helper_funcs *
+ const struct drm_connector_helper_funcs *
)

@@
@@
(
  const struct drm_plane_helper_funcs *
|
- struct drm_plane_helper_funcs *
+ const struct drm_plane_helper_funcs *
)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/nouveau: constify all struct drm_*_helper funcs pointers
Jani Nikula [Wed, 11 Mar 2015 09:51:04 +0000 (11:51 +0200)]
drm/nouveau: constify all struct drm_*_helper funcs pointers

They are not to be modified.

Generated using the semantic patch:

@@
@@
(
  const struct drm_crtc_helper_funcs *
|
- struct drm_crtc_helper_funcs *
+ const struct drm_crtc_helper_funcs *
)

@@
@@
(
  const struct drm_encoder_helper_funcs *
|
- struct drm_encoder_helper_funcs *
+ const struct drm_encoder_helper_funcs *
)

@@
@@
(
  const struct drm_connector_helper_funcs *
|
- struct drm_connector_helper_funcs *
+ const struct drm_connector_helper_funcs *
)

@@
@@
(
  const struct drm_plane_helper_funcs *
|
- struct drm_plane_helper_funcs *
+ const struct drm_plane_helper_funcs *
)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/radeon: constify all struct drm_*_helper funcs pointers
Jani Nikula [Wed, 11 Mar 2015 09:51:02 +0000 (11:51 +0200)]
drm/radeon: constify all struct drm_*_helper funcs pointers

They are not to be modified.

Generated using the semantic patch:

@@
@@
(
  const struct drm_crtc_helper_funcs *
|
- struct drm_crtc_helper_funcs *
+ const struct drm_crtc_helper_funcs *
)

@@
@@
(
  const struct drm_encoder_helper_funcs *
|
- struct drm_encoder_helper_funcs *
+ const struct drm_encoder_helper_funcs *
)

@@
@@
(
  const struct drm_connector_helper_funcs *
|
- struct drm_connector_helper_funcs *
+ const struct drm_connector_helper_funcs *
)

@@
@@
(
  const struct drm_plane_helper_funcs *
|
- struct drm_plane_helper_funcs *
+ const struct drm_plane_helper_funcs *
)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/gma500: constify all struct drm_*_helper funcs pointers
Jani Nikula [Wed, 11 Mar 2015 09:51:01 +0000 (11:51 +0200)]
drm/gma500: constify all struct drm_*_helper funcs pointers

They are not to be modified.

Generated using the semantic patch:

@@
@@
(
  const struct drm_crtc_helper_funcs *
|
- struct drm_crtc_helper_funcs *
+ const struct drm_crtc_helper_funcs *
)

@@
@@
(
  const struct drm_encoder_helper_funcs *
|
- struct drm_encoder_helper_funcs *
+ const struct drm_encoder_helper_funcs *
)

@@
@@
(
  const struct drm_connector_helper_funcs *
|
- struct drm_connector_helper_funcs *
+ const struct drm_connector_helper_funcs *
)

@@
@@
(
  const struct drm_plane_helper_funcs *
|
- struct drm_plane_helper_funcs *
+ const struct drm_plane_helper_funcs *
)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>