deliverable/linux.git
15 years agofb: change rules for global rules match.
Dave Airlie [Wed, 16 Sep 2009 10:45:09 +0000 (20:45 +1000)] 
fb: change rules for global rules match.

Having a : should be enough 'fb:' isn't really useful
if the fb wants to a kms output ID.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: don't require up to 64k allocations. (v2)
Dave Airlie [Wed, 23 Sep 2009 06:56:27 +0000 (16:56 +1000)] 
drm/radeon/kms: don't require up to 64k allocations. (v2)

This avoids needing to do a kmalloc > PAGE_SIZE for the main
indirect buffer chunk, it adds an accessor for all reads from
the chunk and caches a single page at a time for subsequent
reads.

changes since v1:
Use a two page pool which should be the most common case
a single packet spanning > PAGE_SIZE will be hit, but I'm
having trouble seeing anywhere we currently generate anything like that.
hopefully proper short page copying at end
added parser_error flag to set deep errors instead of having to test
every ib value fetch.
fixed bug in patch that went to list.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: enable dac load detection by default.
Dave Airlie [Fri, 25 Sep 2009 01:56:50 +0000 (11:56 +1000)] 
drm/radeon/kms: enable dac load detection by default.

when I added the property I forgot to enable it.

Thanks to soreau on #radeon for tracking it down.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: enable r600 tv outputs.
Dave Airlie [Thu, 24 Sep 2009 22:56:12 +0000 (08:56 +1000)] 
drm/radeon/kms: enable r600 tv outputs.

I never changed this back when I wrote tv-out support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/edid: Fix standard timing parse for EDID <= 1.2
Adam Jackson [Wed, 23 Sep 2009 21:31:21 +0000 (17:31 -0400)] 
drm/edid: Fix standard timing parse for EDID <= 1.2

Aspect ratio code of 0 means 1:1 before EDID 1.3.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/edid: Detailed standard timing blocks have six timings, not five.
Adam Jackson [Wed, 23 Sep 2009 21:31:09 +0000 (17:31 -0400)] 
drm/edid: Detailed standard timing blocks have six timings, not five.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/edid: Ignore bad standard timings.
Adam Jackson [Wed, 23 Sep 2009 21:30:58 +0000 (17:30 -0400)] 
drm/edid: Ignore bad standard timings.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/edid: const cleanup
Adam Jackson [Wed, 23 Sep 2009 21:30:45 +0000 (17:30 -0400)] 
drm/edid: const cleanup

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/r600: set correct pitch for 4 byte copy
Andre Maasikas [Mon, 21 Sep 2009 12:59:41 +0000 (08:59 -0400)] 
drm/radeon/r600: set correct pitch for 4 byte copy

[agd5f: also fix the non-kms path]

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
15 years agodrm/radeon: consolidate family flags used in pciids.
Dave Airlie [Mon, 21 Sep 2009 22:50:10 +0000 (08:50 +1000)] 
drm/radeon: consolidate family flags used in pciids.

having these separate was pointless and introduced a bug when
one got updated without the other.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon: some r420s have a CP race with the DMA engine.
Alex Deucher [Mon, 21 Sep 2009 04:48:45 +0000 (14:48 +1000)] 
drm/radeon: some r420s have a CP race with the DMA engine.

This patch makes sure the CP doesn't DMA do VRAM while 2D
is active by inserting a CP resync token.

todo: port to kms.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/r600/kms: rv670 is not DCE3
Alex Deucher [Fri, 18 Sep 2009 15:30:30 +0000 (11:30 -0400)] 
drm/radeon/r600/kms: rv670 is not DCE3

RV670 was using the wrong modesetting code.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: r420 idle after programming GA_ENHANCE
Dave Airlie [Mon, 21 Sep 2009 04:15:10 +0000 (14:15 +1000)] 
drm/radeon/kms: r420 idle after programming GA_ENHANCE

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

The idle allows rs690 to startup properly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: more fixes to rv770 suspend/resume path.
Dave Airlie [Mon, 21 Sep 2009 04:06:30 +0000 (14:06 +1000)] 
drm/radeon/kms: more fixes to rv770 suspend/resume path.

This resumes my
RV730PRO (4650)
RV770 (4850)
fine.

Still researching the RV4550 (RV710), resumes without X fine.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: more alignment for rv770.c with r600.c
Dave Airlie [Fri, 18 Sep 2009 08:41:24 +0000 (18:41 +1000)] 
drm/radeon/kms: more alignment for rv770.c with r600.c

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: rv770 blit init called too late.
Dave Airlie [Fri, 18 Sep 2009 08:33:07 +0000 (18:33 +1000)] 
drm/radeon/kms: rv770 blit init called too late.

re-align with r600 code, to init blit earlier.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: move around new init path code to avoid posting at init
Dave Airlie [Fri, 18 Sep 2009 05:19:37 +0000 (15:19 +1000)] 
drm/radeon/kms: move around new init path code to avoid posting at init

We really don't want to post the card at init, it takes a relatively
long time and isn't required, so split the resume path into
a startup path called by both init/resume and separate resume
entry point to do posting.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/r600: fix some issues with suspend/resume.
Dave Airlie [Tue, 15 Sep 2009 01:07:52 +0000 (11:07 +1000)] 
drm/radeon/r600: fix some issues with suspend/resume.

a) don't zero gart table on gart enable
b) move pinning shader object into resume path
c) unpin shader object on suspend
d) set cp ready to false after cp shutdown on suspend.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: disable VGA rendering engine before taking over VRAM
Dave Airlie [Fri, 18 Sep 2009 04:16:38 +0000 (14:16 +1000)] 
drm/radeon/kms: disable VGA rendering engine before taking over VRAM

Before we use any of VRAM, we need to disable the VGA rendering
engine, this render text mode into a graphical framebuffer
for scanout, however it does this on vblank, and can end up
overwriting the GART table and r600 shader objects.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init().
Michel Dänzer [Thu, 17 Sep 2009 07:42:28 +0000 (09:42 +0200)] 
drm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init().

Someone on IRC reported problems after commit
95a8f1bf4f48b434c9f839ab5a0773f66b39d7c6 ('drm/radeon/kms: Move
radeon_clocks_init() call back after getting VRAM info.'). And indeed, at least
some ASIC vram_info hooks use the clock info obtained by
radeon_get_clock_info(). So, move that call out of radeon_clocks_init(), ahead
of the radeon_vram_info() call.

[airlied - fixup missing r600/rv770 calls]

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drm/radeon/kms: fix get clock info calls for r600/rv770 init path.

These were missed when it got split out.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add initial connector properties
Dave Airlie [Wed, 9 Sep 2009 07:40:54 +0000 (17:40 +1000)] 
drm/radeon/kms: add initial connector properties

This adds:
coherent mode: TMDS coherent mode for atom cards.
scaling mode: LVDS scaler mode
load detect: DAC load detection, DVI-I, VGA, TV
tmds pll: legacy TMDS pll selection
tv standard: TV standard selection.

for later: other TV ones? dvi subconnector selection using std prop

[contains fixes pointed out on dri-devel for atom bios mixups
 by Michel]

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: Use surfaces for scanout / cursor byte swapping on big endian.
Michel Dänzer [Tue, 15 Sep 2009 15:09:30 +0000 (17:09 +0200)] 
drm/radeon/kms: Use surfaces for scanout / cursor byte swapping on big endian.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: don't fail if we fail to init GPU acceleration
Jerome Glisse [Wed, 16 Sep 2009 13:24:21 +0000 (15:24 +0200)] 
drm/radeon/kms: don't fail if we fail to init GPU acceleration

Userspace can query if acceleration is working or not true get
info ioctl and could fallback to software if for some reason
kernel failed to initialize KMS. This should allow to give a
working KMS setup in all case (even with non functionning accel).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/r600/kms: fixup number of loops per blit calculation.
Dave Airlie [Thu, 17 Sep 2009 06:11:31 +0000 (16:11 +1000)] 
drm/r600/kms: fixup number of loops per blit calculation.

Some people were seeing
*ERROR* radeon: writting more dword to ring than expected
after certain blits, the loops calculation didn't take
into account that we do a separate blit for the remainder
after doing the aligned blits.

Acked-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: reprogram format in set base.
Dave Airlie [Wed, 16 Sep 2009 00:15:21 +0000 (10:15 +1000)] 
drm/radeon/kms: reprogram format in set base.

This should in theory fix the problem with a mode set being required
for adjusting the color depth.

This also adds in the necessary bits to the format tables for
8-bit, though it doesn't work yet.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon: avivo chips have no separate int bit for display
Dave Airlie [Fri, 18 Sep 2009 04:31:48 +0000 (14:31 +1000)] 
drm/radeon: avivo chips have no separate int bit for display

display interrupts are not enabled via this register, the
DISPLAY_INT bit is a status only to show that other regs
need to be read.

Noticed by Alex Deucher

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/r600: don't do interrupts
Alex Deucher [Thu, 17 Sep 2009 18:25:12 +0000 (14:25 -0400)] 
drm/radeon/r600: don't do interrupts

Interrupts are not supported yet.  This prevents
things like mesa from trying to use them.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: fix _DRM_GEM addmap error message
Pekka Paalanen [Thu, 17 Sep 2009 19:59:54 +0000 (22:59 +0300)] 
drm: fix _DRM_GEM addmap error message

Fix the error message: this is add, not rm.
Move the closing brace to proper spot: _DRM_GEM branch should not be
included in the block.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: update crtc x/y when only fb changes
Ben Skeggs [Fri, 18 Sep 2009 00:43:52 +0000 (10:43 +1000)] 
drm: update crtc x/y when only fb changes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: fix drm_fb_helper handling of kernel crtcs
Jesse Barnes [Fri, 18 Sep 2009 01:14:41 +0000 (18:14 -0700)] 
drm: fix drm_fb_helper handling of kernel crtcs

The drm_fb_helper shouldn't mess with CRTCs that aren't enabled or in
its initial config. Ideally it shouldn't even include CRTCs in its
initial config if they're not in use, but my old fix for that no longer
works.  At any rate, this fixes a real bug I was seeing where after a
console blank, both pipes would come back on, even though only one had
been enabled before that.  Since the other pipe had a bogus config,
this led to some screen corruption.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: Get LVDS native mode details from EDID if necessary.
Michel Dänzer [Tue, 15 Sep 2009 15:09:27 +0000 (17:09 +0200)] 
drm/radeon/kms: Get LVDS native mode details from EDID if necessary.

Fixes RMX problems on older Apple laptops which don't have an x86 BIOS ROM.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon: Save and restore bios scratch regs during S/R
Yang Zhao [Tue, 15 Sep 2009 02:21:01 +0000 (12:21 +1000)] 
drm/radeon: Save and restore bios scratch regs during S/R

[airlied:- adapted slightly in naming]

Signed-off-by: Yang Zhao <yang@yangman.ca>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: IB locking dumps out a lockdep ordering issue
Dave Airlie [Tue, 15 Sep 2009 01:12:56 +0000 (11:12 +1000)] 
drm/radeon/kms: IB locking dumps out a lockdep ordering issue

We sometimes lock IB then the ring and sometimes the ring then
the IB. This is mostly due to the IB locking not being well defined
about what data in the structs it actually locks. Define what I
believe is the correct behaviour and gets rid of the lock dep ordering
warning.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: we should return 0 when we have no modes not -1.
Dave Airlie [Tue, 15 Sep 2009 10:21:11 +0000 (20:21 +1000)] 
drm/radeon/kms: we should return 0 when we have no modes not -1.

This fixes my monitor with broken EDID so it at least get 800x600.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: Free CS parser state tracking memory.
Michel Dänzer [Tue, 15 Sep 2009 15:09:32 +0000 (17:09 +0200)] 
drm/radeon/kms: Free CS parser state tracking memory.

Fixes leak hidden in commit 9f022ddfb23793b475ff7e57ac08a766dd5d31bd
('drm/radeon/kms: convert r4xx to new init path').

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms: Don't kzalloc memory which is immediately overwritten.
Michel Dänzer [Tue, 15 Sep 2009 15:09:33 +0000 (17:09 +0200)] 
drm/radeon/kms: Don't kzalloc memory which is immediately overwritten.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms: Move radeon_clocks_init() call back after getting VRAM info.
Michel Dänzer [Tue, 15 Sep 2009 15:09:26 +0000 (17:09 +0200)] 
drm/radeon/kms: Move radeon_clocks_init() call back after getting VRAM info.

It may indirectly call radeon_set_clock_gating() which relies on the VRAM info.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms: Only add common modes which fit in both panel dimensions.
Michel Dänzer [Tue, 15 Sep 2009 15:09:28 +0000 (17:09 +0200)] 
drm/radeon/kms: Only add common modes which fit in both panel dimensions.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms: add 32/64 ioctl support.
Dave Airlie [Mon, 14 Sep 2009 23:03:43 +0000 (09:03 +1000)] 
drm/radeon/kms: add 32/64 ioctl support.

Although the new radeon driver ioctls don't need this, some of
the drm initialisation ioctls require it, so add this to make them
work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: clear confusion in GART init/deinit path
Jerome Glisse [Mon, 14 Sep 2009 16:29:49 +0000 (18:29 +0200)] 
drm/radeon/kms: clear confusion in GART init/deinit path

GART static one time initialization was mixed up with GART
enabling/disabling which could happen several time for instance
during suspend/resume cycles. This patch splits all GART
handling into 4 differents function. gart_init is for one
time initialization, gart_deinit is called upon module unload
to free resources allocated by gart_init, gart_enable enable
the GART and is intented to be call after first initialization
and at each resume cycle or reset cycle. Finaly gart_disable
stop the GART and is intended to be call at suspend time or
when unloading the module.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: cleanup - remove radeon_share.h
Jerome Glisse [Fri, 11 Sep 2009 13:55:33 +0000 (15:55 +0200)] 
drm/radeon/kms: cleanup - remove radeon_share.h

radeon_share.h was begining to give problem with include order in
respect of radeon.h. It's easier and also i think cleaner to move
what was in radeon_share.h into radeon.h. At the same time use the
extern keyword for function shared accross the module.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: move mtrr range add and memory information
Jerome Glisse [Fri, 11 Sep 2009 11:00:43 +0000 (13:00 +0200)] 
drm/radeon/kms: move mtrr range add and memory information

Move mtrr range and memory information printing to radeon_object_init,
this are memory information and initialization common to all GPU and
they better fit in this function. Will also prevent code duplication
with upcoming init path changes.

airlied: fixed warning introduced

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: convert r4xx to new init path
Jerome Glisse [Fri, 11 Sep 2009 13:35:22 +0000 (15:35 +0200)] 
drm/radeon/kms: convert r4xx to new init path

This convert r4xx to new init path it also fix few bugs.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: fix typo in quirks
Alex Deucher [Fri, 11 Sep 2009 19:27:14 +0000 (15:27 -0400)] 
drm/radeon/kms: fix typo in quirks

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms/r600: fix blit dword count for non r6xx
Alex Deucher [Fri, 11 Sep 2009 16:02:03 +0000 (12:02 -0400)] 
drm/radeon/kms/r600: fix blit dword count for non r6xx

rv6xx emits two extra dwords in the render target setup.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms: add common lvds modes in the ddc case
Alex Deucher [Fri, 11 Sep 2009 15:15:43 +0000 (11:15 -0400)] 
drm/radeon/kms: add common lvds modes in the ddc case

previous patch only handled the non-ddc case.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon/kms: set fbdev_info for suspend/resume
Dave Airlie [Fri, 11 Sep 2009 08:35:38 +0000 (18:35 +1000)] 
drm/radeon/kms: set fbdev_info for suspend/resume

this hopefully will bring back suspend/resume under kms.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: move modeset init outside of GPU init
Jerome Glisse [Thu, 10 Sep 2009 19:46:48 +0000 (21:46 +0200)] 
drm/radeon/kms: move modeset init outside of GPU init

We are splitting GPU & modeset init so that it's easier
to abord only remaining GPU init when somethings fails.
We want to always provide enough funcionalities to get
fbcon and a shadowfb X working. Only acceptable error
during initialization are memory allocation failure or
io mapping failure.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add common scaled modes for TV and LVDS
Alex Deucher [Thu, 10 Sep 2009 21:53:39 +0000 (17:53 -0400)] 
drm/radeon/kms: add common scaled modes for TV and LVDS

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: pull in latest quirks and fixes from ddx
Alex Deucher [Thu, 10 Sep 2009 20:31:13 +0000 (16:31 -0400)] 
drm/radeon/kms: pull in latest quirks and fixes from ddx

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms/r600: use blit for BO moves
Alex Deucher [Thu, 10 Sep 2009 19:54:35 +0000 (15:54 -0400)] 
drm/radeon/kms/r600: use blit for BO moves

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: R3XX/R4XX AGP asic use PCI GART not PCIE GART
Jerome Glisse [Thu, 10 Sep 2009 11:47:09 +0000 (13:47 +0200)] 
drm/radeon/kms: R3XX/R4XX AGP asic use PCI GART not PCIE GART

R3XX/R4XX AGP asic use the old PCI GART block, not the new PCIE GART.
Make sure we pick the right GART when disabling AGP.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms/r600: fix blit support
Alex Deucher [Thu, 10 Sep 2009 06:53:50 +0000 (02:53 -0400)] 
drm/radeon/kms/r600: fix blit support

select the correct max number of bytes per blit based
on whether the size is multiple of 4 bytes.  This
determines whether we can use 8 or 32 bit pixels for
the blit.

airlied: also merged the IB padding patch +
correcting the VS offset for context

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: Don't try to process irq when we are unloading
Jerome Glisse [Wed, 9 Sep 2009 20:23:07 +0000 (22:23 +0200)] 
drm/radeon/kms: Don't try to process irq when we are unloading

If module is being unloaded we should not try to handle irq especialy
we should not call into drm helper or we could hard hang the computer
free_irq will call the irq handler to make sure we behave properly.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add R4XX mc register access helper.
Jerome Glisse [Wed, 9 Sep 2009 20:24:20 +0000 (22:24 +0200)] 
drm/radeon/kms: add R4XX mc register access helper.

Atombios will use the mc register access helper and R4XX hw have a
bigger mc range than R3XX so add R4XX specific mc register access
helper.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: call r100_cp_disable rather than duplicating code.
Jerome Glisse [Wed, 9 Sep 2009 20:23:27 +0000 (22:23 +0200)] 
drm/radeon/kms: call r100_cp_disable rather than duplicating code.

r100_cp_fini was duplicating code of r100_cp_disable, call r100_cp_disable
instead.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: wait for cp idle before stopping it.
Jerome Glisse [Wed, 9 Sep 2009 20:23:45 +0000 (22:23 +0200)] 
drm/radeon/kms: wait for cp idle before stopping it.

If we stop CP and that it's still processing thing GPU hang might
happen, this patch wait for CP idle (the wait can timeout) so we
can avoid shutting down CP at bad time. This is especialy usefull
when reseting the GPU as it seems GPU reset fails to properly reset
CP when the CP wasn't stop after being idle.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/r600: fix legacy blit code
Alex Deucher [Wed, 9 Sep 2009 20:09:36 +0000 (16:09 -0400)] 
drm/radeon/r600: fix legacy blit code

ARRAY_SIZE is number of elements not bytes.  Fix
ring counts accordingly, also make a few functions
static.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/r600: use fence->timeout directly
Alex Deucher [Tue, 8 Sep 2009 18:45:05 +0000 (14:45 -0400)] 
drm/radeon/r600: use fence->timeout directly

Fixes fence timeouts on r6xx/r7xx.  Noticed by
taiu on IRC.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
15 years agodrm/radeon/kms: re-apply 2007d633d639c896396e4c4b53b38068f3831307
Alex Deucher [Tue, 8 Sep 2009 18:22:45 +0000 (14:22 -0400)] 
drm/radeon/kms: re-apply 2007d633d639c896396e4c4b53b38068f3831307

Got accidently reverted by c93bb85b5cba3e3a06f2cad8e9bc5c23d3d10aac

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoMerge remote branch 'origin/master' of ../linux-2.6 into drm-next
Dave Airlie [Tue, 8 Sep 2009 04:49:32 +0000 (14:49 +1000)] 
Merge remote branch 'origin/master' of ../linux-2.6 into drm-next

This was a non-trivial merge with some patches sent to Linus
in drm-fixes.

Conflicts:
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/radeon_asic.h
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv515.c

15 years agodrm/radeon/kms: don't allow ERESTART to hit userspace.
Dave Airlie [Tue, 8 Sep 2009 04:38:45 +0000 (14:38 +1000)] 
drm/radeon/kms: don't allow ERESTART to hit userspace.

the pre-r600 fence code returns ebusy if we get hit by a signal
so we should continue to do that.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: prune modes when output is disconnected.
Adam Jackson [Tue, 8 Sep 2009 01:51:46 +0000 (11:51 +1000)] 
drm: prune modes when output is disconnected.

When an output was disconnected, its mode list would remain.  If you later
plugged into a sink with no EDID (projector, etc), you'd inherit the mode
list from the old sink, which is not what you want.

taken from Fedora kernel

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: shut the EDID warnings up.
Adam Jackson [Tue, 8 Sep 2009 01:48:40 +0000 (11:48 +1000)] 
drm: shut the EDID warnings up.

These really aren't all that useful.

taken from Fedora kernel.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: get the bridge device once.
Dave Airlie [Tue, 4 Aug 2009 01:43:41 +0000 (11:43 +1000)] 
drm/i915: get the bridge device once.

The driver gets the bridge device in a number of places, upcoming
vga arb code paths need the bridge device, however they need it in
under a lock, and the pci lookup can allocate memory. So clean
this code up before then and get the bridge once for the driver lifetime.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: include seq_file.h for debugfs builds.
Dave Airlie [Tue, 8 Sep 2009 01:32:08 +0000 (11:32 +1000)] 
drm: include seq_file.h for debugfs builds.

Fixes a warning seen on powerpc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: lower debugging on dpms events.
Dave Airlie [Tue, 8 Sep 2009 01:17:38 +0000 (11:17 +1000)] 
drm/radeon/kms: lower debugging on dpms events.

Lower the debugging on encoders when getting DPMS events.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/kms/radeon: make kms default a runtime option
Dave Airlie [Tue, 8 Sep 2009 01:09:50 +0000 (11:09 +1000)] 
drm/kms/radeon: make kms default a runtime option

This makes the kms/enable disable a runtime not a build time
option.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/kms: fix kms helper license + Kconfig
Dave Airlie [Tue, 8 Sep 2009 01:08:32 +0000 (11:08 +1000)] 
drm/kms: fix kms helper license + Kconfig

Allow the KMS module to work properly, and also rename
it to KMS_HELPER so its clearer what its for.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add r600 KMS support
Jerome Glisse [Tue, 8 Sep 2009 00:10:24 +0000 (10:10 +1000)] 
drm/radeon/kms: add r600 KMS support

This adds the r600 KMS + CS support to the Linux kernel.

The r600 TTM support is quite basic and still needs more
work esp around using interrupts, but the polled fencing
should work okay for now.

Also currently TTM is using memcpy to do VRAM moves,
the code is here to use a 3D blit to do this, but
isn't fully debugged yet.

Authors:
Alex Deucher <alexdeucher@gmail.com>
Dave Airlie <airlied@redhat.com>
Jerome Glisse <jglisse@redhat.com>

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add initial radeon tv-out support.
Dave Airlie [Thu, 13 Aug 2009 06:32:14 +0000 (16:32 +1000)] 
drm/radeon/kms: add initial radeon tv-out support.

This ports the tv-out code from the DDX to KMS.

adds a radeon.tv module option, radeon.tv=0 to disable tv

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add rn50/r100/r200 CS tracker.
Dave Airlie [Tue, 1 Sep 2009 05:25:57 +0000 (15:25 +1000)] 
drm/radeon/kms: add rn50/r100/r200 CS tracker.

This adds the command stream checker for the RN50, R100 and R200 cards.

It stops any access to 3D registers on RN50, and does checks
on buffer sizes on the r100/r200 cards. It also fixes some texture
sizing checks on r300.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 7 Sep 2009 18:42:25 +0000 (11:42 -0700)] 
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: add LTE/GTE discard + rv515 two sided stencil register.

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 7 Sep 2009 18:41:15 +0000 (11:41 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  IMA: update ima_counts_put

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 7 Sep 2009 18:40:24 +0000 (11:40 -0700)] 
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  gianfar: Fix build.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 7 Sep 2009 18:40:15 +0000 (11:40 -0700)] 
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  pcmcia: add CNF-CDROM-ID for ide

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
Linus Torvalds [Mon, 7 Sep 2009 18:38:30 +0000 (11:38 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/anholt/drm-intel

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
  agp/intel: support for new chip variant of IGDNG mobile
  drm/i915: Unref old_obj on get_fence_reg() error path
  drm/i915: increase default latency constant (v2 w/comment)

15 years agoMerge intel drm-intel-next branch
Dave Airlie [Mon, 7 Sep 2009 10:27:20 +0000 (20:27 +1000)] 
Merge intel drm-intel-next branch

Merge remote branch 'anholt/drm-intel-next' of ../anholt-2.6 into drm-next

Conflicts:
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sdvo.c

15 years agodrm/kms: remove old std mode fallback code.
Dave Airlie [Mon, 7 Sep 2009 08:43:26 +0000 (18:43 +1000)] 
drm/kms: remove old std mode fallback code.

The new code adds modes in the helper, which makes more sense
I disliked the non-driver code adding modes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/kms/i915: Add the default mode for CRT output without EDID
ykzhao [Thu, 3 Sep 2009 06:30:04 +0000 (14:30 +0800)] 
drm/kms/i915: Add the default mode for CRT output without EDID

Add the default mode for every output device when there
is no mode for it.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/kms: add a function that can add the mode for the output device without EDID
Zhao Yakui [Thu, 3 Sep 2009 01:33:48 +0000 (09:33 +0800)] 
drm/kms: add a function that can add the mode for the output device without EDID

Add a function that can be used to add the default mode for the output device
without EDID.
It will add the default mode that meets with the requirements of given
hdisplay/vdisplay limit.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/kms: try to find the std mode in DMT table
Zhao Yakui [Thu, 3 Sep 2009 01:33:47 +0000 (09:33 +0800)] 
drm/kms: try to find the std mode in DMT table

When we need to add the standard timing mode, we will firstly check whether it
can be found in DMT table by comparing the hdisplay/vdisplay/vfresh_rate.
If it can't be found, then we will use the cvt/gtf to add the required mode.
If it can be found, it will be returned.

At the same time the function of drm_mode_vrefresh is also fixed. It will
return the result of actual refresh_rate plus 0.5.
For example:
When the calculated value is 84.9, then the fresh_rate is 85.
When the calculated value is 70.02, then the fresh_rate is 70.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/kms: Add the default mode table
Zhao Yakui [Thu, 3 Sep 2009 01:33:46 +0000 (09:33 +0800)] 
drm/kms: Add the default mode table

When we add a standard timing mode in UMS, we will first check whether it can
be found in default mode table. If it can't be found, then we will use cvt/gtf
to add the standard timing mode.
Add the default mode table so that we can check whether the given mode
can be found in the default mode table as what we have done in UMS mode.

If the status of one output device is connected but there is no EDID, it will
have no correct mode. In such case we can add some default modes for it. Of
course we only add the modes in the default modes list that visible part is not
greater than 1024x768.

The default mode is autogenerated from the DMT spec. And it is copied from
xserver/hw/xfree86/modes/xf86EdidModes.c. But the mode with reduced blank
feature is removed.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: split crtc/fb helpers into a separate module
Dave Airlie [Mon, 7 Sep 2009 05:45:33 +0000 (15:45 +1000)] 
drm: split crtc/fb helpers into a separate module

I really don't want to have core drm module rely on CONFIG_FB,
so this is the easiest answer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add LTE/GTE discard + rv515 two sided stencil register.
Dave Airlie [Mon, 7 Sep 2009 05:26:19 +0000 (15:26 +1000)] 
drm/radeon/kms: add LTE/GTE discard + rv515 two sided stencil register.

This adds some rv350+ register for LTE/GTE discard,
and enables the rv515 two sided stencil register.
It also disables the DEPTHXY_OFFSET register which
can be used to workaround the CS checker.
Moves rs690 to proper place in rs600 and uses correct
table on rs600.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: add updated registers from drm-fixes.
Dave Airlie [Mon, 7 Sep 2009 03:49:07 +0000 (13:49 +1000)] 
drm/radeon/kms: add updated registers from drm-fixes.

Fixes up the DISCARD + 2 sided stencil in the new generator scripts.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon/kms: block depthxy offset from use from userspace.
Dave Airlie [Tue, 1 Sep 2009 04:40:41 +0000 (14:40 +1000)] 
drm/radeon/kms: block depthxy offset from use from userspace.

This could be used to bypass CS checks.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoIMA: update ima_counts_put
Mimi Zohar [Fri, 4 Sep 2009 17:08:46 +0000 (13:08 -0400)] 
IMA: update ima_counts_put

- As ima_counts_put() may be called after the inode has been freed,
verify that the inode is not NULL, before dereferencing it.

- Maintain the IMA file counters in may_open() properly, decrementing
any counter increments on subsequent errors.

Reported-by: Ciprian Docan <docan@eden.rutgers.edu>
Reported-by: J.R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Eric Paris <eparis@redhat.com
Signed-off-by: James Morris <jmorris@namei.org>
15 years agodrm/i915: Put the idle reclocking work on our private workqueue as well.
Eric Anholt [Sun, 6 Sep 2009 22:18:53 +0000 (15:18 -0700)] 
drm/i915: Put the idle reclocking work on our private workqueue as well.

Fixes (again) whole-system lockups due to GPU lockups.

Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Pad ringbuffer with NOOPs before wrapping
Chris Wilson [Sat, 5 Sep 2009 17:07:06 +0000 (18:07 +0100)] 
drm/i915: Pad ringbuffer with NOOPs before wrapping

According to the docs, the ringbuffer is not allowed to wrap in the middle
of an instruction.

G45 PRM, Vol 1b, p101:
  While the “free space” wrap may allow commands to be wrapped around the
  end of the Ring Buffer, the wrap should only occur between commands.
  Padding (with NOP) may be required to follow this restriction.

Do as commanded.

[Having seen bug reports where there is evidence of split commands, but
apparently the GPU has continued on merrily before a bizarre and untimely
death, this may or may not fix a few random hangs.]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
CC: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agogianfar: Fix build.
David S. Miller [Sun, 6 Sep 2009 08:41:02 +0000 (01:41 -0700)] 
gianfar: Fix build.

Reported by Michael Guntsche <mike@it-loops.com>

--------------------
Commit
38bddf04bcfe661fbdab94888c3b72c32f6873b3 gianfar: gfar_remove needs to call unregister_netdev()

breaks the build of the gianfar driver because "dev" is undefined in
this function. To quickly test rc9 I changed this to priv->ndev but I do
not know if this is the correct one.
--------------------

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoLinux 2.6.31-rc9
Linus Torvalds [Sat, 5 Sep 2009 23:38:12 +0000 (16:38 -0700)] 
Linux 2.6.31-rc9

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Sat, 5 Sep 2009 21:59:00 +0000 (14:59 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: sbp2: fix freeing of unallocated memory
  firewire: ohci: fix Ricoh R5C832, video reception
  firewire: ohci: fix Agere FW643 and multiple cameras
  firewire: core: fix crash in iso resource management

15 years agopowerpc: Fix i8259 interrupt driver kernel crash on ML510
Roderick Colenbrander [Thu, 3 Sep 2009 15:57:23 +0000 (09:57 -0600)] 
powerpc: Fix i8259 interrupt driver kernel crash on ML510

This patch fixes a null pointer exception caused by removal of
'ack()' for level interrupts in the Xilinx interrupt driver.  A recent
change to the xilinx interrupt controller removed the ack hook for
level irqs.

Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/~dwmw2/mtd-2.6.31
Linus Torvalds [Sat, 5 Sep 2009 21:57:04 +0000 (14:57 -0700)] 
Merge git://git.infradead.org/~dwmw2/mtd-2.6.31

* git://git.infradead.org/~dwmw2/mtd-2.6.31:
  JFFS2: add missing verify buffer allocation/deallocation
  mtd: nftl: fix offset alignments
  mtd: nftl: write support is broken
  mtd: m25p80: fix null pointer dereference bug

15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Sat, 5 Sep 2009 21:56:13 +0000 (14:56 -0700)] 
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: Allow changing max_sectors_kb above the default 512

15 years agoMerge branch 'fix/oxygen' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Sat, 5 Sep 2009 21:55:30 +0000 (14:55 -0700)] 
Merge branch 'fix/oxygen' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'fix/oxygen' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: oxygen: handle cards with missing EEPROM
  sound: oxygen: fix MCLK rate for 192 kHz playback

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 5 Sep 2009 21:52:41 +0000 (14:52 -0700)] 
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  tc: Fix unitialized kernel memory leak
  pkt_sched: Revert tasklet_hrtimer changes.
  net: sk_free() should be allowed right after sk_alloc()
  gianfar: gfar_remove needs to call unregister_netdev()
  ipw2200: firmware DMA loading rework

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 5 Sep 2009 21:51:45 +0000 (14:51 -0700)] 
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: skcipher - Fix skcipher_dequeue_givcrypt NULL test

15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Sat, 5 Sep 2009 21:51:24 +0000 (14:51 -0700)] 
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Re-enable cpufreq suspend and resume code

This page took 0.043303 seconds and 5 git commands to generate.