]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
12 years agodrm/radeon: refactor set_page chipset interface v5
Christian König [Mon, 17 Sep 2012 17:36:18 +0000 (19:36 +0200)]
drm/radeon: refactor set_page chipset interface v5

Cleanup the interface in preparation for hierarchical page tables.

v2: add incr parameter to set_page for simple scattered PTs uptates
    added PDE-specific flags to r600_flags and radeon_drm.h
    removed superfluous value masking with 0xffffffff

v3: removed superfluous bo_va->valid checking
    changed R600_PTE_VALID to R600_ENTRY_VALID to handle PDE too

v4 (ck): fix indention style, rework and fix typos in commit message,
         add documentation for incr parameter, also use incr
         parameter for system pages

v5 (agd5f): use upper_32_bits() and minor white space fixes

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Dmitry Cherkassov <Dmitrii.Cherkasov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: Fix scratch register leak in IB test.
Michel Dänzer [Thu, 20 Sep 2012 08:31:10 +0000 (10:31 +0200)]
drm/radeon: Fix scratch register leak in IB test.

Restructure the code to jump out via labels instead of directly returning
early. Also make error reporting consistent across all hardware generations.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Simon Kitching <skitching@vonos.net>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: restore backlight level on resume
Alex Deucher [Fri, 14 Sep 2012 13:45:50 +0000 (09:45 -0400)]
drm/radeon: restore backlight level on resume

Restore the backlight level on resume.  Some systems
need to explicitly restore the backlight level on
resume.

Fixes panel resume on my Trinity laptop and may fix the
following bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=43829
https://bugzilla.kernel.org/show_bug.cgi?id=46241

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: add get_backlight_level callback
Alex Deucher [Fri, 14 Sep 2012 13:59:26 +0000 (09:59 -0400)]
drm/radeon: add get_backlight_level callback

Read back the backlight level from the hw.
Needed for proper backlight restoration on resume.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: only adjust default clocks on NI GPUs
Alex Deucher [Fri, 14 Sep 2012 14:59:26 +0000 (10:59 -0400)]
drm/radeon: only adjust default clocks on NI GPUs

SI asics store voltage information differently so we
don't have a way to deal with it properly yet.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
12 years agodrm/radeon: validate PPLL in crtc fixup
Alex Deucher [Fri, 14 Sep 2012 16:30:51 +0000 (12:30 -0400)]
drm/radeon: validate PPLL in crtc fixup

This allows us to bail if we can't support the requested
setup from a PPLL perspective.  Prevents broken setups
from being attempted.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: work around KMS modeset limitations in PLL allocation (v2)
Alex Deucher [Mon, 17 Sep 2012 21:34:45 +0000 (17:34 -0400)]
drm/radeon: work around KMS modeset limitations in PLL allocation (v2)

Since the current KMS API sets the mode independantly on
each crtc, we may end up with resource conflicts.  The PLL
allocation is one of those cases.  In the following example
we have 3 crtcs in use driving 2 DVI connectors and 1 DP
connector.  On the initial kernel modeset for fbdev, the
display topology ends up as follows:

crtc0 -> DP-0
crtc1 -> DVI-0
crtc2 -> DVI-1

Because this is the first modeset, all of the PLLs are
available as none have been assigned.  So we end up with
the following:

crtc0 uses DCPLL
crtc1 uses PPLL2
crtc2 uses PPLL1

When X starts, it assigns a different topology:

crtc0 -> DVI-0
crtc1 -> DP-0
crtc2 -> DVI-1

However, since the KMS API is per crtc, we set the mode on each
crtc independantly.  When it comes time to set the mode on crtc0,
the topology for crtc1 and crtc2 are still intact.  crtc1 and
crtc2 are already assigned PPLL2 and PPLL1 so when it comes time
to set the mode on crtc0, crtc1 and crtc2 have not been torn down
yet, so there appears to be no PLLs available.  In reality, we
are reconfiguring the entire display topology, however, since
each crtc is handled independantly, we don't know that in the
driver at each crtc mode set time.

This patch checks to see if the same connector is being driven by
another crtc, and if so, uses the PLL already associated with it.

v2: store connector in the radeon crtc struct, simplify checking.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: make non-DP PPLL sharing more robust
Alex Deucher [Thu, 13 Sep 2012 16:43:41 +0000 (12:43 -0400)]
drm/radeon: make non-DP PPLL sharing more robust

Compare the adjusted clock as well as the crtc mode
clock.  This handles cases where the driver adjusts
the clock for specific special cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: store the encoder in the radeon_crtc
Alex Deucher [Thu, 13 Sep 2012 15:52:08 +0000 (11:52 -0400)]
drm/radeon: store the encoder in the radeon_crtc

This saves lots of lookups later.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: rework crtc pll setup to better support PPLL sharing
Alex Deucher [Thu, 13 Sep 2012 14:56:16 +0000 (10:56 -0400)]
drm/radeon: rework crtc pll setup to better support PPLL sharing

We need the calculate the pixel clock before allocating a PPLL
in order to insure the clocks really match.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: allow PPLL sharing on non-DP displays
Alex Deucher [Wed, 12 Sep 2012 22:54:14 +0000 (18:54 -0400)]
drm/radeon: allow PPLL sharing on non-DP displays

If several non-DP displays use the same pixel clock
we can use the same PPLL for all of them.  If all
relevant displays have the same pixel clock, this
allows the driver to:
- use fewer PPLLs which saves power
- support more than two non-DP displays on DCE4+

The current drm modesetting infrastructure doesn't
really provide a good framework for validating combinations
that work or won't work, so it's possible you could go from
a working configuration to a non-working one by changing the
mode a one of the displays.  However, there this is better
than what was there before.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon/dce3: use a single PPLL for all DP displays
Alex Deucher [Wed, 12 Sep 2012 21:39:57 +0000 (17:39 -0400)]
drm/radeon/dce3: use a single PPLL for all DP displays

If possible, use a single PPLL for multiple DP displays
on DCE3.x.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: rework pll selection (v4)
Alex Deucher [Fri, 31 Aug 2012 15:56:50 +0000 (11:56 -0400)]
drm/radeon: rework pll selection (v4)

For DP we can use the same PPLL for all active DP
encoders.  Take advantage of that to prevent cases
where we may end up sharing a PPLL between DP and
non-DP which won't work.  Also clean up the code
a bit.

v2: - fix missing pll_id assignment in crtc init
v3: - fix DP PPLL check
    - document functions
    - break in main encoder search loop after matching.
      no need to keep checking additional encoders.
v4: - same as v3, but re-apply to drm-next as the corner
      cases are fixed properly in subsequent patches.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=54471

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: fix typo in atombios_get_encoder_mode
Alex Deucher [Thu, 13 Sep 2012 16:01:48 +0000 (12:01 -0400)]
drm/radeon: fix typo in atombios_get_encoder_mode

comparing the encoder mode to the encoder id for DVO.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon/atom: fix typo in SetPixelClock handling
Alex Deucher [Wed, 12 Sep 2012 21:58:07 +0000 (17:58 -0400)]
drm/radeon/atom: fix typo in SetPixelClock handling

MiscInfo field should be programmed with the crtc id
rather than the pll id.  However, at this point the
two are the same for chips with this version of the table.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: white space cleanup in transmitter setup
Alex Deucher [Thu, 6 Sep 2012 16:30:37 +0000 (12:30 -0400)]
drm/radeon: white space cleanup in transmitter setup

Makes it more consistent with the surrounding code.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: clean up encoder dp checks
Alex Deucher [Thu, 6 Sep 2012 16:26:09 +0000 (12:26 -0400)]
drm/radeon: clean up encoder dp checks

Use the proper struct in the union.  That field
has the same offset in every struct, so no functional
change.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: rework the VM code a bit more (v2)
Christian König [Tue, 11 Sep 2012 14:10:04 +0000 (16:10 +0200)]
drm/radeon: rework the VM code a bit more (v2)

Roughly based on how nouveau is handling it. Instead of
adding the bo_va when the address is set add the bo_va
when the handle is opened, but set the address to zero
until userspace tells us where to place it.

This fixes another bunch of problems with glamor.

v2: agd5f: fix build after dropping patch 7/8.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agodrm/radeon: fix gem_close_object handling
Christian König [Tue, 11 Sep 2012 14:10:02 +0000 (16:10 +0200)]
drm/radeon: fix gem_close_object handling

Make the reserve non interruptible.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: let bo_reserve take no_intr instead of no_wait param
Christian König [Tue, 11 Sep 2012 14:10:01 +0000 (16:10 +0200)]
drm/radeon: let bo_reserve take no_intr instead of no_wait param

The no_wait param isn't used anywhere, and actually isn't
very usefull at all.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: move and rename radeon_bo_va function
Christian König [Tue, 11 Sep 2012 14:10:00 +0000 (16:10 +0200)]
drm/radeon: move and rename radeon_bo_va function

It doesn't really belong into the object functions,
also rename it to avoid collisions with struct radeon_bo_va.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: move IB pool to 1MB offset
Christian König [Tue, 11 Sep 2012 14:09:59 +0000 (16:09 +0200)]
drm/radeon: move IB pool to 1MB offset

Even GPUs can have a null pointer dereference, so move
the IB pool to another offset to catch those.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: fix VA overlap check
Christian König [Tue, 11 Sep 2012 14:09:58 +0000 (16:09 +0200)]
drm/radeon: fix VA overlap check

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: fix VA range check
Christian König [Tue, 11 Sep 2012 14:09:57 +0000 (16:09 +0200)]
drm/radeon: fix VA range check

The end offset is exclusive not inclusive.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: fix VM syncing with multiple rings
Christian König [Thu, 6 Sep 2012 11:48:07 +0000 (13:48 +0200)]
drm/radeon: fix VM syncing with multiple rings

When a VM is used on more than one ring we need to
sync to the last user.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: Remove unused functions
Lauri Kasanen [Tue, 31 Jul 2012 14:41:46 +0000 (17:41 +0300)]
drm/radeon: Remove unused functions

This applies on top of drm/radeon: Mark all possible functions / structs as static.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: Mark all possible functions / structs as static
Lauri Kasanen [Fri, 31 Aug 2012 17:43:50 +0000 (13:43 -0400)]
drm/radeon: Mark all possible functions / structs as static

Let's allow GCC to optimize better.

This exposed some five unused functions, but this patch doesn't remove them.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: remove dead function def
Alex Deucher [Fri, 31 Aug 2012 17:28:12 +0000 (13:28 -0400)]
drm/radeon: remove dead function def

Was removed in the async VM update series.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: implement bounds checking on thermal controller lookup
Alex Deucher [Thu, 30 Aug 2012 17:30:49 +0000 (13:30 -0400)]
drm/radeon: implement bounds checking on thermal controller lookup

Don't read past the end of the array if we encounter an unknown
thermal controller.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: document async VM changes in ni.c
Alex Deucher [Fri, 31 Aug 2012 17:51:21 +0000 (13:51 -0400)]
drm/radeon: document async VM changes in ni.c

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: make page table updates async v2
Christian König [Sat, 11 Aug 2012 13:00:30 +0000 (15:00 +0200)]
drm/radeon: make page table updates async v2

Currently doing the update with the CP.

v2: Rebased on Jeromes bugfix. Make validity comparison
    more human readable.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agodrm/radeon: make sure ib bo is properly bound and up to date in vm space
Jerome Glisse [Mon, 13 Aug 2012 16:07:33 +0000 (12:07 -0400)]
drm/radeon: make sure ib bo is properly bound and up to date in vm space

Make sure that the ib bo is bound and is page table is up to date
in the virtual address space.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
12 years agodrm/radeon: Move looping over the PTEs into chip code
Christian König [Sat, 11 Aug 2012 09:54:05 +0000 (11:54 +0200)]
drm/radeon: Move looping over the PTEs into chip code

Makes it easier to move it into the rings.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: rework VM page table handling
Christian König [Thu, 9 Aug 2012 18:02:28 +0000 (20:02 +0200)]
drm/radeon: rework VM page table handling

Removing the need to wait for anything.

Still not ideal, since we need to free pt on va remove.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: rework VMID handling
Christian König [Thu, 9 Aug 2012 14:21:08 +0000 (16:21 +0200)]
drm/radeon: rework VMID handling

Move binding onto the ring, simplifying handling a bit.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: make VM flushs a ring operation
Christian König [Wed, 8 Aug 2012 10:22:43 +0000 (12:22 +0200)]
drm/radeon: make VM flushs a ring operation

Move flushing the VMs as function into the rings.
First step to make VM operations async.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: add sync helper function
Christian König [Thu, 9 Aug 2012 14:35:36 +0000 (16:35 +0200)]
drm/radeon: add sync helper function

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: remove vm_unbind
Christian König [Mon, 6 Aug 2012 18:45:03 +0000 (20:45 +0200)]
drm/radeon: remove vm_unbind

It actually isn't very useful.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: move VM funcs into asic structure
Christian König [Mon, 6 Aug 2012 18:21:10 +0000 (20:21 +0200)]
drm/radeon: move VM funcs into asic structure

So it looks more like the rest of the driver.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon: cleanup VM id handling a bit
Christian König [Mon, 6 Aug 2012 16:57:44 +0000 (18:57 +0200)]
drm/radeon: cleanup VM id handling a bit

Store a reference to the VM into the IB structure, that
makes calculating the IBs address a bit less complicated.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
12 years agodrm/radeon/atom: add consolidate bpc code
Alex Deucher [Fri, 17 Aug 2012 14:31:34 +0000 (10:31 -0400)]
drm/radeon/atom: add consolidate bpc code

Several encoder setup functions had the same duplicated
code for selecting the proper bpc setting for various
atom tables.  Consolidate it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: rework the backlight control to be an asic callback
Alex Deucher [Fri, 3 Aug 2012 15:39:43 +0000 (11:39 -0400)]
drm/radeon: rework the backlight control to be an asic callback

This cleans up the interface a bit as well.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: add initial support for ATCS ACPI methods
Alex Deucher [Thu, 16 Aug 2012 15:13:43 +0000 (11:13 -0400)]
drm/radeon: add initial support for ATCS ACPI methods

Just verify the interface and track what functions are
supported.  Not actually used yet.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: document radeon_atpx_handler.c (v2)
Alex Deucher [Thu, 16 Aug 2012 18:09:21 +0000 (14:09 -0400)]
drm/radeon: document radeon_atpx_handler.c (v2)

v2: rebase updates

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: reorganize ATPX support (v2)
Alex Deucher [Thu, 16 Aug 2012 18:07:37 +0000 (14:07 -0400)]
drm/radeon: reorganize ATPX support (v2)

- rework the acpi execute code
- User proper parameters for ATPX functions

v2: rebase fixes

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: update ATPX verify interface handling (v2)
Alex Deucher [Thu, 16 Aug 2012 18:01:57 +0000 (14:01 -0400)]
drm/radeon: update ATPX verify interface handling (v2)

Verify the ATPX interface and track what ATPX functions
are available for future use.

v2: rework due to tree changes

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: document radeon_acpi.c
Alex Deucher [Thu, 2 Aug 2012 16:30:49 +0000 (12:30 -0400)]
drm/radeon: document radeon_acpi.c

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: block the keypress on ATIF events
Luca Tettamanti [Thu, 2 Aug 2012 15:39:38 +0000 (11:39 -0400)]
drm/radeon: block the keypress on ATIF events

The AMD ACPI interface may use ACPI_VIDEO_NOTIFY_PROBE to signal SBIOS
requests; block the keypress in this case since the user did not
actually press the mode switch key.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoACPI video: allow events handlers to veto the keypress
Luca Tettamanti [Thu, 2 Aug 2012 13:30:27 +0000 (15:30 +0200)]
ACPI video: allow events handlers to veto the keypress

The standard video events may be overloaded for device specific
purposes. For example AMD ACPI interface overloads
ACPI_VIDEO_NOTIFY_PROBE (0x81) to signal AMD-specific events. In such
cases we don't want to send the keypress (KEY_SWITCHVIDEOMODE) to the
userspace because the user did not press the mode switch key (the
spurious keypress confuses the DE which usually changes the
display configuration and messes up a dual-screen setup).
This patch gives the handlers the chance to examine the event and
block the keypress if the event is device specific.
v2: refactor as suggested by Zhang Rui <rui.zhang@intel.com>

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: re-organize the acpi notifier callback
Alex Deucher [Tue, 31 Jul 2012 21:14:35 +0000 (17:14 -0400)]
drm/radeon: re-organize the acpi notifier callback

Move it out of the radeon_pm.c and into radeon_acpi.c since
we use it for more than just pm now.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: implement handler for ACPI event
Luca Tettamanti [Mon, 30 Jul 2012 19:20:35 +0000 (21:20 +0200)]
drm/radeon: implement handler for ACPI event

Set up an handler for ACPI events and respond to brightness change
requests from the system BIOS.
v2: fix notification when using device-specific command codes
(tested by Pali Rohár <pali.rohar@gmail.com>); cache the encoder
controlling the backlight during the initialization to avoid searching
it every time (suggested by Alex Deucher).
v3: whitespace fixes (Alex Deucher).

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: implement wrapper for GET_SYSTEM_PARAMS
Luca Tettamanti [Mon, 30 Jul 2012 19:16:06 +0000 (21:16 +0200)]
drm/radeon: implement wrapper for GET_SYSTEM_PARAMS

Use GET_SYSTEM_PARAMS for retrieving the configuration for the system
BIOS notifications.
v2: packed struct (Lee, Chun-Yi <jlee@suse.com>)
v3: fix enable with device specific command code

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: implement radeon_atif_verify_interface
Luca Tettamanti [Thu, 16 Aug 2012 15:11:18 +0000 (11:11 -0400)]
drm/radeon: implement radeon_atif_verify_interface

Wrap the call to VERIFY_INTERFACE and add the parsing of the support
vectors.
v2: use a packed struct for handling the output of ACPI calls, hides
ugly pointer arithmetics (Lee, Chun-Yi <jlee@suse.com>).
v3: fix radeon_atif_parse_functions handling (Alex Deucher)

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: refactor radeon_atif_call
Luca Tettamanti [Sun, 29 Jul 2012 15:04:43 +0000 (17:04 +0200)]
drm/radeon: refactor radeon_atif_call

Don't hard-code function number, this will allow to reuse the function.
v2: add support for the 2nd parameter (from Lee, Chun-Yi
<jlee@suse.com>).

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: add backlight control for atom devices (v2)
Alex Deucher [Thu, 26 Jul 2012 15:32:03 +0000 (11:32 -0400)]
drm/radeon: add backlight control for atom devices (v2)

On systems that use the build in GPU backlight controller,
we can use atom tables to change the brightness level.

v2: use firmware flags

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: rework legacy backlight control
Alex Deucher [Thu, 26 Jul 2012 15:05:22 +0000 (11:05 -0400)]
drm/radeon: rework legacy backlight control

To better enable sharing with atom backlight control.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: track whether the GPU controls the backlight (v2)
Alex Deucher [Thu, 26 Jul 2012 13:50:57 +0000 (09:50 -0400)]
drm/radeon: track whether the GPU controls the backlight (v2)

A table in the vbios tells us whether the GPU backlight controller
is used or not.  If the bit is set, the GPU backlight controller is
used; if it is not set, an off-chip backlight controller is used.

v2: store all the firmware flags, not just BL control

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: add a license header to radeon_apci.c
Alex Deucher [Tue, 31 Jul 2012 21:18:17 +0000 (17:18 -0400)]
drm/radeon: add a license header to radeon_apci.c

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: add new AMD ACPI header and update relevant code (v2)
Alex Deucher [Wed, 18 Jul 2012 17:28:52 +0000 (13:28 -0400)]
drm/radeon: add new AMD ACPI header and update relevant code (v2)

Add a new header that defines the AMD ACPI interface used
for laptops, PowerXpress, and chipset specific functionality
and update the current code to use it.

Todo:
- properly verify the ACPI interfaces
- hook up and handle ACPI notifications
- make PX code more robust
- implement PCIe Gen and width switching using ACPI

v2: fix typo in header

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoAnnotate int2float() as being a pure function.
Steven Fuerst [Wed, 15 Aug 2012 22:07:16 +0000 (15:07 -0700)]
Annotate int2float() as being a pure function.

This allows gcc to fold duplicate calls into a single call.  Since
the current users do actually call it multiple times with the
same arguments, this is an obvious win.

Signed-off-by: Steven Fuerst <svfuerst@gmail.com>
12 years agoReplace int2float() with an optimized version.
Steven Fuerst [Wed, 15 Aug 2012 22:07:15 +0000 (15:07 -0700)]
Replace int2float() with an optimized version.

We use __fls() to find the most significant bit.  Using that, the
loop can be avoided.  A second trick is to use the behaviour of the
rotate instructions to expand the range of the unsigned int to float
conversion to the full 32 bits in a branchless way.

The routine is now exact up to 2^24.  Above that, we truncate which
is equivalent to rounding towards zero.

Signed-off-by: Steven Fuerst <svfuerst@gmail.com>
12 years agoRename i2f() to int2float(), and make it global so one copy can be removed.
Steven Fuerst [Wed, 15 Aug 2012 22:07:14 +0000 (15:07 -0700)]
Rename i2f() to int2float(), and make it global so one copy can be removed.

Remove the copy of i2f() in r600_blit_kms.c
We rename the function to something longer now that it is a global
symbol.  This reduces the likelyhood of unintended clashes later.

This might be a candidate for inclusion inside general drm infrastructure.
However, at the moment only the radeon driver uses it.

Signed-off-by: Steven Fuerst <svfuerst@gmail.com>
12 years agodrm/radeon: remove gui_idle interrupt infrastructure
Alex Deucher [Fri, 10 Aug 2012 17:26:24 +0000 (13:26 -0400)]
drm/radeon: remove gui_idle interrupt infrastructure

It was only used for dynpm, but has been replaced with
a better implementation using fences.  Remove it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon/dynpm: wait for fences on all rings when reclocking
Alex Deucher [Fri, 10 Aug 2012 17:12:08 +0000 (13:12 -0400)]
drm/radeon/dynpm: wait for fences on all rings when reclocking

1. Drop gui idle stuff, it's not as reliable as fences and only
covers the 3D engine.
2. Wait for fences on all rings.  This makes sure all rings are
idle when reclocking.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: properly handle mc_stop/mc_resume on evergreen+ (v2)
Alex Deucher [Wed, 15 Aug 2012 21:18:42 +0000 (17:18 -0400)]
drm/radeon: properly handle mc_stop/mc_resume on evergreen+ (v2)

- Stop the displays from accessing the FB
- Block CPU access
- Turn off MC client access

This should fix issues some users have seen, especially
with UEFI, when changing the MC FB location that result
in hangs or display corruption.

v2: fix crtc enabled check noticed by Luca Tettamanti

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon/r5xx-r7xx: don't use radeon_crtc for vblank callback (v2)
Alex Deucher [Wed, 15 Aug 2012 21:06:28 +0000 (17:06 -0400)]
drm/radeon/r5xx-r7xx: don't use radeon_crtc for vblank callback (v2)

This might be called before we've allocated the radeon_crtcs

v2: fix typo in array size

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon/r1xx-r4xx: don't use radeon_crtc for vblank callback
Alex Deucher [Wed, 15 Aug 2012 20:58:30 +0000 (16:58 -0400)]
drm/radeon/r1xx-r4xx: don't use radeon_crtc for vblank callback

This might be called before we've allocated the radeon_crtcs

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: clean up evergreen_get_vblank_counter
Alex Deucher [Wed, 15 Aug 2012 21:10:32 +0000 (17:10 -0400)]
drm/radeon: clean up evergreen_get_vblank_counter

Use the new offset array rather than open coding it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon/dce4+: don't use radeon_crtc for vblank callback
Alex Deucher [Wed, 15 Aug 2012 21:13:53 +0000 (17:13 -0400)]
drm/radeon/dce4+: don't use radeon_crtc for vblank callback

This might be called before we've allocated the radeon_crtcs

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: Prevent leak of scratch register on resume from suspend
Simon Kitching [Thu, 20 Sep 2012 16:59:16 +0000 (12:59 -0400)]
drm/radeon: Prevent leak of scratch register on resume from suspend

Cards typically have 5-7 scratch registers; one of these is reserved for
rdev->rptr_save_reg. Unfortunately the reservation is done in function
r100_cp_init, which is called by all drivers except r600 - and this
function is also invoked on resume from suspend. After several resumes,
no scratch registers are free and graphics acceleration is disabled.

Dmesg then reports either:
   *ERROR* radeon: cp failed to get scratch reg (-22).
   *ERROR* radeon: cp isn't working(-22).
   radeon 0000:01:00.0: failed initializing CP (-22).
or:
   *ERROR* radeon: failed to get scratch reg (-22).
   *ERROR* radeon: failed testing IB on GFX ring (-22).
   *ERROR* ib ring test failed (-22).

The chain of calls on boot for all except r600 is:
radeon_init -> ... -> (rXXX_init) -> rXXX_startup -> r100_cp_init

The chain of calls on resume for all except r600 is:
rXXX_resume -> rXXX_startup -> r100_cp_init.

R600 correctly allocates rptr_save_reg in r600_init (ie once only, not
in resume). However moving the code into the init functions for all
drivers means touching 4 drivers. So instead, this patch just adds a
test in r100_cp_init to avoid reallocating on resume. As the rdev
structure is allocated via kzalloc in radeon_driver_load_kms, and zero
is not a valid registerid, zero safely implies not-yet-allocated.

This issue appears to have been introduced in c7eff978 (3.6.0-rcN)

Signed-off-by: Simon Kitching <skitching@vonos.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoRevert "drm/radeon: rework pll selection (v3)"
Alex Deucher [Mon, 17 Sep 2012 21:26:24 +0000 (17:26 -0400)]
Revert "drm/radeon: rework pll selection (v3)"

This reverts commit 985f61f7ee647ad570c05eab0b74915da2ac8e19.

This commit fixed certain cases, but ended up regressing others
due to limitations in the current KMS API.  A proper fix is too
invasive for 3.6.  Push it back to 3.7.

Reported-by: Andres Freund <andres@anarazel.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/nouveau: fix booting with plymouth + dumb support
Dave Airlie [Fri, 14 Sep 2012 03:28:23 +0000 (13:28 +1000)]
drm/nouveau: fix booting with plymouth + dumb support

We noticed a plymouth bug on Fedora 18, and I then
noticed this stupid thinko, fixing it fixed the problem
with plymouth.

Cc: stable@vger.kernel.org
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 14 Sep 2012 01:20:46 +0000 (11:20 +1000)]
Merge branch 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Alex writes:

This is the current set of radeon fixes for 3.6.  Two small fixes:
- fix the fence issues introduced in 3.5 with 64-bit fences
- PLL fix for multiple DP heads

* 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: make 64bit fences more robust v3
  drm/radeon: rework pll selection (v3)

12 years agodrm/radeon: make 64bit fences more robust v3
Christian König [Thu, 13 Sep 2012 08:33:47 +0000 (10:33 +0200)]
drm/radeon: make 64bit fences more robust v3

Only increase the higher 32bits if we really detect a wrap around.

v2: instead of increasing the higher 32bits just use the higher
    32bits from the last emitted fence.
v3: also use last emitted fence value as upper limit.

The intention of this patch is to make fences as robust as
they where before introducing 64bit fences. This is
necessary because on older systems it looks like the fence
value gets corrupted on initialization.

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

Should also fix:
https://bugs.freedesktop.org/show_bug.cgi?id=54129
https://bugs.freedesktop.org/show_bug.cgi?id=54662
https://bugzilla.redhat.com/show_bug.cgi?id=846505
https://bugzilla.redhat.com/show_bug.cgi?id=845639

3.5 needs a separate patch due to changes in the
fence code.  Will send that out separately.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agodrm/radeon: rework pll selection (v3)
Alex Deucher [Fri, 31 Aug 2012 15:56:50 +0000 (11:56 -0400)]
drm/radeon: rework pll selection (v3)

For DP we can use the same PPLL for all active DP
encoders.  Take advantage of that to prevent cases
where we may end up sharing a PPLL between DP and
non-DP which won't work.  Also clean up the code
a bit.

v2: - fix missing pll_id assignment in crtc init
v3: - fix DP PPLL check
    - document functions
    - break in main encoder search loop after matching.
      no need to keep checking additional encoders.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=54471

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
12 years agoMerge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung...
Dave Airlie [Thu, 13 Sep 2012 04:18:55 +0000 (14:18 +1000)]
Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes

Inki Dae writes:
- fix build warnings
- minor code cleanup
- remove non-standard format, DRM_FORMAT_NV12M
- add dummy mmap for exynos dmabuf
  . dma_buf export needs this patch

* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm: Drop the NV12M and YUV420M formats
  drm/exynos: remove DRM_FORMAT_NV12M from plane module
  drm/exynos: fix double call of drm_prime_(init/destroy)_file_private
  drm/exynos: add dummy support for dmabuf-mmap
  drm/exynos: Add missing braces around sizeof in exynos_mixer.c
  drm/exynos: Add missing braces around sizeof in exynos_hdmi.c
  drm/exynos: Make g2d_pm_ops static
  drm/exynos: Add dependency for G2D in Kconfig
  drm/exynos: fixed page align bug.
  drm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
  drm/exynos: Use devm_* functions in exynos_drm_g2d.c file
  drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file
  drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file
  drm/exynos: Remove redundant check in exynos_drm_fimd.c file
  drm/exynos: Remove redundant check in exynos_hdmi.c file

12 years agodrm: Drop the NV12M and YUV420M formats
Ville Syrjälä [Fri, 20 Apr 2012 15:26:10 +0000 (18:26 +0300)]
drm: Drop the NV12M and YUV420M formats

The NV12M/YUV420M formats are identical to the NV12/YUV420 formats.
So just remove these duplicated format names.

This might look like breaking the ABI, but the code has never actually
accepted these formats, so nothing can be using them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: remove DRM_FORMAT_NV12M from plane module
Inki Dae [Fri, 7 Sep 2012 07:18:15 +0000 (16:18 +0900)]
drm/exynos: remove DRM_FORMAT_NV12M from plane module

this patch removes DRM_FORMAT_NV12M from plane module because this format
is same as DRM_FORMAT_NV12. DRM_FORMAT_NV12M will be identified by
mode_cmd->handles and mode_cmd->offsets fields internally.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
12 years agodrm/exynos: fix double call of drm_prime_(init/destroy)_file_private
Mandeep Singh Baines [Thu, 6 Sep 2012 16:49:23 +0000 (09:49 -0700)]
drm/exynos: fix double call of drm_prime_(init/destroy)_file_private

The double invocations are incorrect but seem to be safe so I don't
think this will fix any bugs.

Before:

[    7.639366] drm_prime_init_file ee3675d0
[    7.639377] drm_prime_init_file ee3675d0
[    7.639507] drm_prime_destroy_file ee3675d0
[    7.639518] drm_prime_destroy_file ee3675d0
[    7.639802] drm_prime_init_file ee372390
[    7.639810] drm_prime_init_file ee372390
[    8.473316] drm_prime_init_file ee356390
[    8.473331] drm_prime_init_file ee356390

After:

[    6.363842] drm_prime_init_file edc2e5d0
[    6.363994] drm_prime_destroy_file edc2e5d0
[    6.364260] drm_prime_init_file edc2e750
[    8.004837] drm_prime_init_file ee36ded0

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: add dummy support for dmabuf-mmap
Tomasz Stanislawski [Wed, 5 Sep 2012 10:31:56 +0000 (19:31 +0900)]
drm/exynos: add dummy support for dmabuf-mmap

This patch adds a stub function for DMABUF mmap.
This allows to export a DMABUF.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: Add missing braces around sizeof in exynos_mixer.c
Sachin Kamat [Fri, 31 Aug 2012 10:20:48 +0000 (15:50 +0530)]
drm/exynos: Add missing braces around sizeof in exynos_mixer.c

Fixes the following checkpatch warnings:
WARNING: sizeof filter_y_horiz_tap8 should be sizeof(filter_y_horiz_tap8)
WARNING: sizeof filter_y_vert_tap4 should be sizeof(filter_y_vert_tap4)
WARNING: sizeof filter_cr_horiz_tap4 should be sizeof(filter_cr_horiz_tap4)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Add missing braces around sizeof in exynos_hdmi.c
Sachin Kamat [Fri, 31 Aug 2012 10:20:47 +0000 (15:50 +0530)]
drm/exynos: Add missing braces around sizeof in exynos_hdmi.c

Fixes the following checkpatch warnings:
WARNING: sizeof *res should be sizeof(*res)
WARNING: sizeof res->regul_bulk[0] should be sizeof(res->regul_bulk[0])
WARNING: sizeof *res should be sizeof(*res)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Make g2d_pm_ops static
Sachin Kamat [Tue, 28 Aug 2012 08:41:41 +0000 (14:11 +0530)]
drm/exynos: Make g2d_pm_ops static

Fixes the following warning:
drivers/gpu/drm/exynos/exynos_drm_g2d.c:897:1: warning:
symbol 'g2d_pm_ops' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Add dependency for G2D in Kconfig
Sachin Kamat [Tue, 14 Aug 2012 06:37:20 +0000 (12:07 +0530)]
drm/exynos: Add dependency for G2D in Kconfig

Select Exynos DRM based G2D only if non-DRM based Exynos G2D driver
is not selected.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: fixed page align bug.
Inki Dae [Fri, 17 Aug 2012 06:24:03 +0000 (15:24 +0900)]
drm/exynos: fixed page align bug.

do not align in page unit at dumb creation. the align is done
by exynos_drm_gem_create() to be called commonly.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
Thomas Meyer [Tue, 7 Aug 2012 06:57:25 +0000 (08:57 +0200)]
drm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]

The semantic patch that makes this change is available
in scripts/coccinelle/api/err_cast.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use devm_* functions in exynos_drm_g2d.c file
Sachin Kamat [Mon, 6 Aug 2012 06:46:20 +0000 (12:16 +0530)]
drm/exynos: Use devm_* functions in exynos_drm_g2d.c file

devm_* functions are device managed functions and make error handling
and cleanup cleaner and simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file
Sachin Kamat [Mon, 6 Aug 2012 06:46:19 +0000 (12:16 +0530)]
drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file

devm_kzalloc is a device managed function and makes freeing and error
handling simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file
Sachin Kamat [Mon, 6 Aug 2012 06:46:18 +0000 (12:16 +0530)]
drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file

devm_kzalloc is a device managed function and makes freeing and error
handling simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Remove redundant check in exynos_drm_fimd.c file
Sachin Kamat [Mon, 6 Aug 2012 06:46:17 +0000 (12:16 +0530)]
drm/exynos: Remove redundant check in exynos_drm_fimd.c file

devm_request_and_ioremap function checks the validity of the
pointer returned by platform_get_resource. Hence an additional check
in the probe function is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Remove redundant check in exynos_hdmi.c file
Sachin Kamat [Mon, 6 Aug 2012 06:46:16 +0000 (12:16 +0530)]
drm/exynos: Remove redundant check in exynos_hdmi.c file

devm_request_and_ioremap function checks the validity of the
pointer returned by platform_get_resource. Hence an additional check
in the probe function is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agovmwgfx: add dumb ioctl support
Dave Airlie [Tue, 28 Aug 2012 01:53:54 +0000 (01:53 +0000)]
vmwgfx: add dumb ioctl support

Testing and works with the -modesetting driver,

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Fix regression on Oaktrail devices
Alan Cox [Wed, 12 Sep 2012 10:05:04 +0000 (10:05 +0000)]
gma500: Fix regression on Oaktrail devices

The register map patches didn't set one value for the GMA600 which
means the Fujitsu Q550 dies on boot with the GMA500 driver enabled.

Add the map entry so we don't read from the device MMIO + 0 by mistake.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Horses <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel...
Dave Airlie [Thu, 13 Sep 2012 01:07:31 +0000 (11:07 +1000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Daniel writes:
"Nothing really major at all:
- fixup edp setup sequence (Dave)
- disable sdvo hotplug for real, this is a fixup for a messed-up
  regression fixer (Jani)
- don't expose dysfunctional backlight driver (Jani)
- properly init spinlock (only used by hsw/vlv code) from Alexander
  Shishkin"
along with a couple of more fixes on top.

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: fix up the IBX transcoder B check
  drm/i915: set the right gen3 flip_done mode also at resume
  drm/i915: initialize dpio_lock spin lock
  drm/i915: do not expose a dysfunctional backlight interface to userspace
  drm/i915: only enable sdvo hotplug irq if needed
  drm/i915/edp: get the panel delay before powering up

12 years agoMerge branch 'for-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Tue, 11 Sep 2012 23:16:54 +0000 (07:16 +0800)]
Merge branch 'for-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fixes from Tejun Heo:
 "It's later than I'd like but well the timing just didn't work out this
  time.

  There are three bug fixes.  One from before 3.6-rc1 and two from the
  new CPU hotplug code.  Kudos to Lai for discovering all of them and
  providing fixes.

   * Atomicity bug when clearing a flag and setting another.  The two
     operation should have been atomic but wasn't.  This bug has existed
     for a long time but is unlikely to have actually happened.  Fix is
     safe.  Marked for -stable.

   * If CPU hotplug cycles happen back-to-back before workers finish the
     previous cycle, the states could get out of sync and it could get
     stuck.  Fixed by waiting for workers to complete before finishing
     hotplug cycle.

   * While CPU hotplug is in progress, idle workers could be depleted
     which can then lead to deadlock.  I think both happening together
     is highly unlikely but still better to fix it and the fix isn't too
     scary.

  There's another workqueue related regression which reported a few days
  ago:

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

  It's a bit of head scratcher but there is a semi-reliable reproduce
  case, so I'm hoping to resolve it soonish."

* 'for-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: fix possible idle worker depletion across CPU hotplug
  workqueue: restore POOL_MANAGING_WORKERS
  workqueue: fix possible deadlock in idle worker rebinding
  workqueue: move WORKER_REBIND clearing in rebind_workers() to the end of the function
  workqueue: UNBOUND -> REBIND morphing in rebind_workers() should be atomic

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Tue, 11 Sep 2012 23:14:17 +0000 (07:14 +0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This fixes the authenc self-test crash as well as a missing export of
  a symbol used by a module."

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: authenc - Fix crash with zero-length assoc data
  crypto/caam: Export gen_split_key symbol for other modules

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo...
Linus Torvalds [Tue, 11 Sep 2012 23:12:53 +0000 (07:12 +0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin

Pull blackfin updates from Bob Liu:
 "One kbuild and a smp build fix."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin:
  kbuild: add symbol prefix arg to kallsyms
  blackfin: smp: adapt to generic smp helpers

12 years agodrm/i915: fix up the IBX transcoder B check
Daniel Vetter [Mon, 10 Sep 2012 19:58:29 +0000 (21:58 +0200)]
drm/i915: fix up the IBX transcoder B check

This has been added in

commit de9a35abb3b343a25065449234e47a76c4f3454a
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Jun 5 11:03:40 2012 +0200

    drm/i915: assert that the IBX port transcoder select w/a is implemented

Unfortunately I've failed to notice that these checks are not just
called for the port that is about to be disabled, but for all (which
makes sense for an assert ...), and the WARN missfired when disabling
another pipe than the one with the dp port.

Hence also check whether the port is actually disabled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54688
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agocrypto: authenc - Fix crash with zero-length assoc data
Herbert Xu [Tue, 11 Sep 2012 04:05:45 +0000 (12:05 +0800)]
crypto: authenc - Fix crash with zero-length assoc data

The authenc code doesn't deal with zero-length associated data
correctly and ends up constructing a zero-length sg entry which
causes a crash when it's fed into the crypto system.

This patch fixes this by avoiding the code-path that triggers
the SG construction if we have no associated data.

This isn't the most optimal fix as it means that we'll end up
using the fallback code-path even when we could still execute
the digest function.  However, this isn't a big deal as nobody
but the test path would supply zero-length associated data.

Reported-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Romain Francoise <romain@orebokech.com>
12 years agokbuild: add symbol prefix arg to kallsyms
James Hogan [Thu, 6 Sep 2012 21:11:25 +0000 (22:11 +0100)]
kbuild: add symbol prefix arg to kallsyms

Commit 1f2bfbd00e466ff3489b2ca5cc75b1cccd14c123 ("kbuild: link of
vmlinux moved to a script") introduced in v3.5-rc1 broke kallsyms on
architectures which have symbol prefixes.

The --symbol-prefix argument used to be added to the KALLSYMS command
line from the architecture Makefile, however this isn't picked up by the
new scripts/link-vmlinux.sh. This resulted in symbols like
kallsyms_addresses being added which weren't correctly overriding the
weak symbols such as _kallsyms_addresses. These could then trigger
BUG_ONs in kallsyms code.

This is fixed by removing the KALLSYMS addition from the architecture
Makefile, and using CONFIG_SYMBOL_PREFIX in the link-vmlinux.sh script
to determine whether to add the --symbol-prefix argument.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>