Ben Skeggs [Mon, 12 Mar 2012 01:16:55 +0000 (11:16 +1000)]
drm/nouveau/dp: account for channel coding overhead in link training
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 11 Mar 2012 06:13:49 +0000 (16:13 +1000)]
drm/nvd0/disp: fix dcb sor link matching in supervisor handler
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 10 Mar 2012 15:28:48 +0000 (01:28 +1000)]
drm/nvd0/disp: initial implementation of displayport
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 10 Mar 2012 15:20:54 +0000 (01:20 +1000)]
drm/nouveau/dp: make dp dpms function common, call from sor code instead
GF119 will use this too.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Thu, 8 Mar 2012 23:15:01 +0000 (00:15 +0100)]
drm/nv50/hwsq: some nv92 fixes
The shift from hwsq_data = 0x1400 to 0x080000 actually happened in nv94, not nv92
This fixes some reclocking issues on my newly acquired nv92
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 9 Mar 2012 06:22:56 +0000 (16:22 +1000)]
drm/nouveau/dp: move all nv50/sor-specific code out of nouveau_dp.c
Off-chip encoders (which we don't support yet anyway), and newer chipsets
(such as NVD9...), will need their own code for this.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 9 Mar 2012 05:22:19 +0000 (15:22 +1000)]
drm/nouveau/dp: make functions for executing various bios tables
More code to do the same thing, but will make it easier to handle various
changes that could possibly happen the the VBIOS tables.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 7 Mar 2012 04:18:49 +0000 (14:18 +1000)]
drm/nouveau/pm: fix oops if chipset has no pm support at all
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 7 Mar 2012 03:22:50 +0000 (13:22 +1000)]
drm/nouveau/bios: rework vbios shadowing
Refactored to allow shadowing of VBIOS images longer than 64KiB, which
allows us to pass the VBIOS checksum test on certain boards.
There's also a workaround for reading the PROM VBIOS on some chipsets.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 4 Mar 2012 07:05:54 +0000 (17:05 +1000)]
drm/nouveau/bios: attempt acpi rom fetch before pcirom
There's cards out there with completely messed up PCIROM images that have
a perfectly valid signature.. Sigh!
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 4 Mar 2012 06:25:59 +0000 (16:25 +1000)]
drm/nvd0/disp: attempt to handle more than 2 crtcs if possible
Theoretically handles CRTC2/CRTC3, should any GF119 out there actually
have them enabled. The room is there for the regs etc, so why not :)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 4 Mar 2012 05:44:59 +0000 (15:44 +1000)]
drm/nvc0/vram: get part count from PUNITS
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 9 Feb 2012 05:25:25 +0000 (15:25 +1000)]
drm/nv40/pm: fix fanspeed regression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Mon, 6 Feb 2012 23:29:06 +0000 (00:29 +0100)]
drm/nouveau/pm: several fixes for nvc0 memory timings
This patch fixes two small issues in timing generation as spotted on
several NVCx cards.
In addition, the header of the file is updated to also contain (some of)
the current developers of this code.
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 6 Feb 2012 23:59:54 +0000 (09:59 +1000)]
drm/nvc0/pm: restrict pll mode to clocks that can actually use it
Fixes reclocking failure on some chips where we attempted to set PDAEMON
to PLL mode.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Xi Wang [Fri, 3 Feb 2012 16:13:55 +0000 (11:13 -0500)]
drm/nouveau/dp: fix bad comparison in dp_link_train_commit()
The comparison (lpre == DP_TRAIN_PRE_EMPHASIS_9_5) is always false:
lpre is initialized as (lane & 0x0c) >> 2, which is at most 3, while
DP_TRAIN_PRE_EMPHASIS_9_5 is defined as (3 << 3).
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Feb 2012 23:33:05 +0000 (09:33 +1000)]
drm/nouveau/mxm: call mxmi to determine revision before calling mxms
There's a HP laptop out there where the MXM version in the VBIOS doesn't
match what the ACPI implementation is expecting. These tables will accept
0x00 to MXMS to return latest version, but *only* if MXMI has been called
first..
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Feb 2012 05:17:07 +0000 (15:17 +1000)]
drm/nouveau/pm: init only after display subsystem has been created
This patch fixes an oops cause by pm_trigger accessing the (uninitialised)
crtc list.
Reported-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 31 Jan 2012 23:05:42 +0000 (09:05 +1000)]
drm/nvc0/fb: detect presense of second rank
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Christoph Bumiller [Sat, 21 Jan 2012 22:13:26 +0000 (23:13 +0100)]
drm/nv50/display: expose color vibrance control
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 12 Jan 2012 05:34:54 +0000 (15:34 +1000)]
drm/nv50-nvc0/vm: support unsnooped system memory
v2 (Emil Velikov <emil.l.velikov@gmail.com>):
- Fixed a regression on certain nv50 IGP due to not passing the correct
target type to nv50_vm_addr()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Johannes Obermayr <johannesobermayr@gmx.de>
Ben Skeggs [Thu, 12 Jan 2012 06:17:16 +0000 (16:17 +1000)]
drm/nouveau: recognise DCB connector type for DP+DVI+VGA DMS-59
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 24 Jan 2012 08:30:10 +0000 (18:30 +1000)]
drm/nouveau/mem: handle dll_off for ddr2/ddr3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 24 Jan 2012 08:03:25 +0000 (18:03 +1000)]
drm/nouveau/pm: extend profile interface for destroy/init/fini
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 24 Jan 2012 05:59:07 +0000 (15:59 +1000)]
drm/nouveau/pm: rework to allow selecting separate profiles for ac/battery
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 24 Jan 2012 03:39:56 +0000 (13:39 +1000)]
drm/nouveau/pm: fix dll off -> dll on transitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 24 Jan 2012 01:26:40 +0000 (11:26 +1000)]
drm/nouveau/pm: detect when we need dll disabled for gddr3
Fixes minor flickering on NVS295 when at perflvl 0.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 24 Jan 2012 01:03:14 +0000 (11:03 +1000)]
drm/nv50: fix detection of second vram rank
Goes a long way to correcting NVS295 memory reclocking issues.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 24 Jan 2012 00:24:05 +0000 (10:24 +1000)]
drm/nouveau/pm: track mr2 for gddr3
There's some "extended" GDDR3 chipsets out there with EMRS2 settings that
change the layout of MRS/EMRS1 bitmaps.. Sigh.. Still need to track down
how exactly we're supposed to handle this.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Martin Peres [Mon, 9 Jan 2012 05:23:10 +0000 (15:23 +1000)]
drm/nv50/pm: wait for all fifo-connected engines to idle before reclocking
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 23 Jan 2012 23:47:04 +0000 (09:47 +1000)]
drm/nv50/pm: use hwsq for engine reclocking too
Idea from Martin Peres, different implementation by me.
v2: Martin Peres:
- fix mast calculation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Mon, 23 Jan 2012 03:22:58 +0000 (13:22 +1000)]
drm/nv50/disp: more accurate function to determine active crtcs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Mon, 23 Jan 2012 03:17:11 +0000 (13:17 +1000)]
drm/nv50/pm: initial work towards proper memory reclocking, with timings
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Mon, 23 Jan 2012 03:12:09 +0000 (13:12 +1000)]
drm/nouveau/pm: introduce ram reclocking helper
This will probably result in more lines of code, however, we're going to
have at least 3 slightly different implementations of this very soon and
I'd rather keep the ram reclocking logic separate from the hw specifics.
DDR2/DDR3/GDDR3 implemented thus far, others will be added as necessary.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 17 Jan 2012 23:02:28 +0000 (09:02 +1000)]
drm/nouveau/pm: embed timings into perflvl structs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Tue, 17 Jan 2012 11:10:58 +0000 (21:10 +1000)]
drm/nouveau/pm: calculate memory timings at perflvl creation time
Statically generating the PFB register and MR values for each timing set
turns out to be insufficient. There's at least one (so far) known piece
of information which effects MR values which is stored in the perflvl
entry on some chipsets (and in another table on later ones), which is
disconnected from the timing table entries.
After this change we will generate a timing set based on an input clock
frequency instead, and have this data stored in the performance level
data.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Mon, 23 Jan 2012 03:47:02 +0000 (13:47 +1000)]
drm/nouveau/pm: readback boot perflvl *before* parsing vbios
We might want/need the boot data to generate the other perflevels.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Roy Spliet [Mon, 9 Jan 2012 05:23:07 +0000 (15:23 +1000)]
drm/nouveau/pm: implement DDR2/DDR3/GDDR3/GDDR5 MR generation and validation
Roy Spliet:
- Implement according to specs
- Simplify
- Make array for mc latency registers
Martin Peres:
- squash and split all the commits from Roy
- rework following Ben Skeggs comments
- add a form of timings validation
- store the initial timings for later use
Ben Skeggs
- merge slightly modified tidy-up patch with this one
- remove perflvl-dropping logic for the moment
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 16 Jan 2012 12:34:03 +0000 (22:34 +1000)]
drm/nouveau/pm: restructure bios table parsing
It turns out we need access to some additional information in various VBIOS
tables to handle PFB memory timings correctly.
Rather than hack in parsing of the new stuff in some kludgy way, I've
restructured the VBIOS parsing to be more primitive, so we can use them in
more flexible ways in the future.
The perflvl->timing association code is disabled for the moment until it can
be reworked. We don't use this stuff yet anyway, so no harm done.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Ben Skeggs [Mon, 23 Jan 2012 02:58:33 +0000 (12:58 +1000)]
drm/nouveau/pm: avoid potential divide-by-zero
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Jean Delvare [Wed, 30 Nov 2011 16:23:55 +0000 (17:23 +0100)]
drm/nouveau: Fix module parameter description formats
Module parameter descriptions don't take a trailing \n, otherwise it
breaks formatting of modinfo's output. Also remove trailing space.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 25 Nov 2011 14:52:22 +0000 (15:52 +0100)]
drm/nouveau/pm: improve memory timing generation
- Rename several VBIOS entries to closer match the real world
- Add the missing 0x100238 and 0x100240 register values
- Parse bit 14 of the VBIOS timing table
- "Magic value" -> tCWL, fixing some minor bugs in the process
- Also name a few more by their name rather than their number.
- Some values seem to be dependent on the memory type. Fix
Edits by Martin Peres <martin.peres@labri.fr>:
- this is a squash commit
- reworked for fixing some style issues
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Wed, 2 Nov 2011 23:03:06 +0000 (00:03 +0100)]
drm/nouveau/pm: improve the reclocking logs' readability
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sat, 20 Aug 2011 14:37:06 +0000 (16:37 +0200)]
drm/nouveau: move pwm_divisor to the nouveau_pm_fan struct
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Thu, 6 Oct 2011 23:33:12 +0000 (01:33 +0200)]
drm/nouveau/pm: restore fan speed after suspend
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sat, 17 Dec 2011 11:24:59 +0000 (12:24 +0100)]
drm/nouveau/pm: style fixes
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 15 Dec 2011 00:43:03 +0000 (10:43 +1000)]
drm/nouveau: rework the init/takedown ordering
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 13 Dec 2011 02:46:18 +0000 (12:46 +1000)]
drm/nvc0: add initial memory type detection
Uses only the VBIOS tables, from what I can tell this is what NVIDIA do
too, I was able to change the detected memory type by modifying this table
on a NVC1 chipset.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 13 Dec 2011 01:57:55 +0000 (11:57 +1000)]
drm/nv50: hopefully handle the DDR2/DDR3 memtype detection somewhat better
M version 2 appears to have a table with some form of memory type info
available.
NVIDIA appear to ignore the table information except for this DDR2/DDR3
case (which has the same value in 0x100714). My guess is this is due to
some of the supported memory types not being represented in the table.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 12 Dec 2011 23:45:25 +0000 (09:45 +1000)]
drm/nv50: add memory type detection
DDR1/DDR[23] confirmed on NVA8 (see note about DDR3 in source) by changing
the value and watching the binary driver's behaviour.
GDDR3/4 values confirmed on a NV96 via the same method above. That GDDR4
is present is interesting, as far as I can see no boards using it were ever
released.
GDDR5 value is based on VBIOS images of known GDDR5 boards.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 12 Dec 2011 13:03:14 +0000 (23:03 +1000)]
drm/nv20-nv40: add memory type detection
NV20/NV30 is partially educated guesswork at this point, based on any
information around about available memory types and a horribly unspeakable
amount of vbios image scouring. I'm not entirely certain the GDDR3 define
is correct, I have not spotted a single vbios with that value yet (though
it is mentioned in some 1218-using nv4x vbios), but there are reports that
some nv3x did use it..
NV40(100914) confirmed by switching an NV49 to DDR1/DDR2 values and making
sure that the binary driver behaviour showed it had detected DDR1/DDR2
instead of GDDR3 before dying horribly.
NV40(100474) confirmed by doing much the same task as above on an NV44,
except this was *much* easier as changing the values didn't seem to have
any noticable effect on the memory controller aside from changing the
binary driver's behaviour.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 12 Dec 2011 12:51:33 +0000 (22:51 +1000)]
drm/nv20: split PFB code out of nv10_fb.c
Most functions were quite different between NV10/NV20 already, and they're
about to get even more so.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 10 Dec 2011 15:31:17 +0000 (01:31 +1000)]
drm/nouveau: memory type detection for the really old chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sat, 10 Dec 2011 14:30:05 +0000 (00:30 +1000)]
drm/nouveau: move vram detection funcs to chipset-specific fb code
Also, display detected memory type in logs - though, we don't even try to
detect this yet.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Dave Airlie [Sat, 10 Mar 2012 13:10:41 +0000 (13:10 +0000)]
Merge branch 'drm-gma500-alanc' into drm-core-next
* drm-gma500-alanc: (47 commits)
gma500: psb_irq: mark mid_{enable, disable}_pipe_event() as static
gma500: mark psb_intel_sdvo_hdmi_sink_detect() as static
gma500: psb_intel_display: drop unused variables
gma500: mark psb_intel_pipe_set_base() as static
gma500: drop unused psb_intel_modeset_cleanup()
gma500: oaktrail_lvds_init() drop unused variable
gma500: oaktrail_hdmi_i2c_access() drop unused variable
gma500: mark oaktrail_backlight_init() as static
gma500: oaktrail_hdmi: fix -Wmissing-field-initializers warning
gma500: oaktrail_hdmi: drop dead code
gma500: oaktrail_crtc: drop unused variables
gma500: oaktrail_crtc: mark few functions as static
gma500: mdfld_intel_display: drop unused variables
gma500: mdfld_dsi_pkg_sender: fix -Wtype-limits warning
gma500: mdfld_dsi_dpi: drop unused variables
gma500: mdfld_device: mark few functions as static
gma500: cdv_intel_lvds: #if 0 currently unused functions
gma500: cdv_intel_lvds: mark few functions as static
gma500: cdv_intel_hdmi: add missing include
gma500: cdv_intel_crt: mark few functions as static
...
Kirill A. Shutemov [Thu, 8 Mar 2012 16:15:47 +0000 (16:15 +0000)]
gma500: psb_irq: mark mid_{enable, disable}_pipe_event() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:15:34 +0000 (16:15 +0000)]
gma500: mark psb_intel_sdvo_hdmi_sink_detect() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:15:20 +0000 (16:15 +0000)]
gma500: psb_intel_display: drop unused variables
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:14:44 +0000 (16:14 +0000)]
gma500: mark psb_intel_pipe_set_base() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:14:32 +0000 (16:14 +0000)]
gma500: drop unused psb_intel_modeset_cleanup()
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:14:18 +0000 (16:14 +0000)]
gma500: oaktrail_lvds_init() drop unused variable
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:13:23 +0000 (16:13 +0000)]
gma500: oaktrail_hdmi_i2c_access() drop unused variable
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:13:10 +0000 (16:13 +0000)]
gma500: mark oaktrail_backlight_init() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:12:56 +0000 (16:12 +0000)]
gma500: oaktrail_hdmi: fix -Wmissing-field-initializers warning
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:12:28 +0000 (16:12 +0000)]
gma500: oaktrail_hdmi: drop dead code
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:12:16 +0000 (16:12 +0000)]
gma500: oaktrail_crtc: drop unused variables
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:12:04 +0000 (16:12 +0000)]
gma500: oaktrail_crtc: mark few functions as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:11:50 +0000 (16:11 +0000)]
gma500: mdfld_intel_display: drop unused variables
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:11:38 +0000 (16:11 +0000)]
gma500: mdfld_dsi_pkg_sender: fix -Wtype-limits warning
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:11:26 +0000 (16:11 +0000)]
gma500: mdfld_dsi_dpi: drop unused variables
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:11:14 +0000 (16:11 +0000)]
gma500: mdfld_device: mark few functions as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:11:02 +0000 (16:11 +0000)]
gma500: cdv_intel_lvds: #if 0 currently unused functions
cdv_intel_lvds_set_brightness() is only used in commented out code in
cdv_set_brightness().
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:10:50 +0000 (16:10 +0000)]
gma500: cdv_intel_lvds: mark few functions as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:10:38 +0000 (16:10 +0000)]
gma500: cdv_intel_hdmi: add missing include
drivers/gpu/drm/gma500/cdv_intel_hdmi.c:305:6: warning: no previous prototype for 'cdv_hdmi_init' [-Wmissing-prototypes]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:10:23 +0000 (16:10 +0000)]
gma500: cdv_intel_crt: mark few functions as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:10:10 +0000 (16:10 +0000)]
gma500: cdv_intel_crt: drop unused variables
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:09:57 +0000 (16:09 +0000)]
gma500: cdv_intel_crt: drop dead code
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:09:45 +0000 (16:09 +0000)]
gma500: cdv_intel_crt: add missing include
drivers/gpu/drm/gma500/cdv_intel_crt.c:273:6: warning: no previous prototype for 'cdv_intel_crt_init' [-Wmissing-prototypes]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:09:33 +0000 (16:09 +0000)]
gma500: fix cdv_intel_wait_for_vblank() prototype
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:09:19 +0000 (16:09 +0000)]
gma500: fix two -Wmissing-field-initializers warnings
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:08:45 +0000 (16:08 +0000)]
gma500: mark psb_driver_device_is_agp() and psb_driver_preclose() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:05:00 +0000 (16:05 +0000)]
gma500: psb_driver_load(): drop unused variables
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:04:47 +0000 (16:04 +0000)]
gma500: fix ioctl confict
Move DRM_GMA_GET_PIPE_FROM_CRTC_ID to 0x08 to avoid confict with
DRM_GMA_GEM_MMAP.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:04:32 +0000 (16:04 +0000)]
gma500: use DRM_IOCTL_DEF_DRV instead of custom PSB_IOCTL_DEF
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:04:20 +0000 (16:04 +0000)]
gma500: mmu: mark psb_mmu_free_pt() and psb_mmu_pt_alloc_map_lock() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:04:08 +0000 (16:04 +0000)]
gma500: mmu: drop unused psb_get_default_pd_addr()
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:03:55 +0000 (16:03 +0000)]
gma500: gtt: mark psb_gtt_entry() and psb_gtt_alloc() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:03:44 +0000 (16:03 +0000)]
gma500: mark psb_fbdev_destroy() and psb_fbdev_fini() as static
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:03:32 +0000 (16:03 +0000)]
gma500: drop unused psbfb_suspend()/psbfb_resume()
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:03:19 +0000 (16:03 +0000)]
gma500: gem_glue: add missing include
It fixes W=1 warnings:
drivers/gpu/drm/gma500/gem_glue.c:23:6: warning: no previous prototype for ‘drm_gem_object_release_wrap’ [-Wmissing-prototypes]
drivers/gpu/drm/gma500/gem_glue.c:44:5: warning: no previous prototype for ‘gem_create_mmap_offset’ [-Wmissing-prototypes]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:03:04 +0000 (16:03 +0000)]
gma500: medfield: drop a bit of dead code
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:02:50 +0000 (16:02 +0000)]
gma500: mdfld_dsi_output_init() drop unused parameter
Nobody uses 'config' parameter.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:02:36 +0000 (16:02 +0000)]
gma500: psbfb_create(): move depth initialization out of loop
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:02:20 +0000 (16:02 +0000)]
gma500: initial medfield merge
We need to merge this ahead of some of the cleanup because a lot of needed
cleanup spans both new and old chips. If we try and clean up and the merge
we end up fighting ourselves.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
[With a load of the cleanup stuff folded in, register stuff reworked sanely]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alan Cox [Thu, 8 Mar 2012 16:02:05 +0000 (16:02 +0000)]
gma500: rework register stuff sanely
Rework registers handling to prepare for Medfield.
Signed-off-by: Alan Cox <alan@linux.intel.com>
[split out from a single big patch]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kirill A. Shutemov [Thu, 8 Mar 2012 16:01:51 +0000 (16:01 +0000)]
gma500: make init_pm callback in struct psb_op optional
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alan Cox [Thu, 8 Mar 2012 16:01:39 +0000 (16:01 +0000)]
gma500: re-order calling on the fix setup so we set up after the DRM layer
Noted by Kirill A Shutemov
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesper Juhl [Thu, 8 Mar 2012 16:00:58 +0000 (16:00 +0000)]
intel, gma500, lvds: Fix use after free and mem leak in psb_intel_lvds_init()
In psb_intel_lvds_init(), if we fail to allocate memory for
'psb_intel_connector' we free the memory we previously allocated for
'psb_intel_encoder', but we then proceed to use that free'd pointer
when we do 'psb_intel_encoder->dev_priv = lvds_priv;'.
We may also leak the memory we allocated for 'psb_intel_encoder' if we
'goto failed_connector;' and the variable goes out of scope.
While I was there anyway, I also removed the pointless 'if
(psb_intel_connector)' before freeing it at the 'failed_connector:'
label - kfree() deals gracefully with NULL pointers, so it is not
needed.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alan Cox [Thu, 8 Mar 2012 16:00:45 +0000 (16:00 +0000)]
gma500: Kconfig documentation tweak
Update this to better reflect the status
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alan Cox [Thu, 8 Mar 2012 16:00:31 +0000 (16:00 +0000)]
gma500: now move the Oaktrail save state into its own structure
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>