summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2011-12-21drm/exynos: Use struct drm_mode_fb_cmd2Joonyoung Shim
The exynos drm also should use struct drm_mode_fb_cmd2 by changes of 308e5bcbdb10452e8aba31aa21432fb67ee46d72 commit(drm: add an fb creation ioctl that takes a pixel format v5). Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2011-12-21drm/exynos: Fix compile errorsJoonyoung Shim
This compile errors occur by changes of e08e96de986ceb2c6b683df0bd0c4ddd4f91dcfd commit, so exynos drm should apply this changes. CC drivers/gpu/drm/exynos/exynos_drm_drv.o drivers/gpu/drm/exynos/exynos_drm_drv.c:185: warning: braces around scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:185: warning: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:186: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:186: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:186: warning: initialization from incompatible pointer type drivers/gpu/drm/exynos/exynos_drm_drv.c:187: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:187: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:187: warning: excess elements in scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:187: warning: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:188: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:188: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:188: warning: excess elements in scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:188: warning: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:189: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:189: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:189: warning: excess elements in scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:189: warning: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:190: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:190: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:190: warning: excess elements in scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:190: warning: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:191: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:191: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:191: warning: excess elements in scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:191: warning: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:192: error: field name not in record or union initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:192: error: (near initialization for 'exynos_drm_driver.fops') drivers/gpu/drm/exynos/exynos_drm_drv.c:192: warning: excess elements in scalar initializer drivers/gpu/drm/exynos/exynos_drm_drv.c:192: warning: (near initialization for 'exynos_drm_driver.fops') make[4]: *** [drivers/gpu/drm/exynos/exynos_drm_drv.o] Error 1 make[3]: *** [drivers/gpu/drm/exynos] Error 2 make[2]: *** [drivers/gpu/drm] Error 2 make[1]: *** [drivers/gpu] Error 2 make: *** [drivers] Error 2 Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2011-12-20drm: Add drm_format_num_planes() utility functionVille Syrjälä
This function returns the number of planes used by a specific pixel format. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Rob Clark <rob.clark@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: call connector dpms fxn, when setting configRob Clark
Call connector->funcs->dpms(DPMS_ON) rather than just setting connector->dpms = DPMS_ON. This ensures that if the connector has something to do to enable the output (rather than just using drm_helper_connector_dpms helper directly), that this happens at bootup. This solves an issue with connectors not getting enabled from fbcon_init() when the driver is loaded. Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon/kms: don't use 0 bpc for adjusting hdmi clockDave Airlie
If the bpc is set from the connector is 0, we then use it later to adjust in a special case the HDMI pixel clock, however if the bpc is 0, we end up passing a 0 pixel clock into the code. I'm not sure if this is the correct answer or if we should avoid the HDMI clock adjustment for 0 values. This fixes a divide by 0 on my Llano system with a HDMI monitor and hdmi audio enabled. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20Merge branch 'drm-radeon-next' of ../drm-radeon-next into drm-core-nextDave Airlie
* 'drm-radeon-next' of ../drm-radeon-next: drm/radeon: introduce a sub allocator and convert ib pool to it v4 drm/radeon/kms: add support for per-ring fence interrupts drm/radeon/kms: add cayman specific fence_ring_emit drm/radeon/kms: add some new ring params to better handle other ring types drm/radeon: improve radeon_test_syncing function drm/radeon: precompute fence cpu/gpu addr once v3 drm/radeon: move ring debugfs into radeon_ring.c drm/radeon: rename struct radeon_cp to radeon_ring drm/radeon: disable compute rings on cayman for now drm/radeon: add radeon_fence_count_emited function drm/radeon: make some asic pointers per ring drm/radeon: Add radeon_test_syncing function v2 drm/radeon: make cp variable an array drm/radeon: make ring rptr and wptr register offsets variable drm/radeon: make all functions work with multiple rings. drm/radeon/kms: add support for semaphores v3 drm/radeon/kms: add support for multiple fence queues v2 drm/radeon: fix a spelling mistake drm/radeon: no need to check all relocs for duplicates drm/radeon: fix debugfs handling v3
2011-12-20drm/radeon: introduce a sub allocator and convert ib pool to it v4Jerome Glisse
Somewhat specializaed sub-allocator designed to perform sub-allocation for command buffer not only for current cs ioctl but for future command submission ioctl as well. Patch also convert current ib pool to use the sub allocator. Idea is that ib poll buffer can be share with other command buffer submission not having 64K granularity. v2 Harmonize pool handling and add suspend/resume callback to pin/unpin sa bo (tested on rv280, rv370, r420, rv515, rv610, rv710, redwood, cayman, rs480, rs690, rs880) v3 Simplify allocator v4 Fix radeon_ib_get error path to properly free fence Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon/kms: add support for per-ring fence interruptsAlex Deucher
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon/kms: add cayman specific fence_ring_emitAlex Deucher
cayman is wb only and doesn't have a VC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon/kms: add some new ring params to better handle other ring typesAlex Deucher
Some rptr/wptrs fields have different offsets and not all rings are pm4 so add a new nop field. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: improve radeon_test_syncing functionChristian König
Also test multiple waits on the same semaphore. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: precompute fence cpu/gpu addr once v3Jerome Glisse
Add a start fence driver helper function which will be call once for each ring and will compute cpu/gpu addr for fence depending on wether to use wb buffer or scratch reg. This patch replace initialize fence driver separately which was broken in regard of GPU lockup. The fence list for created, emited, signaled must be initialize once and only from the asic init callback not from the startup call back which is call from the gpu reset. v2: With this in place we no longer need to know the number of rings in fence_driver_init, also writing to the scratch reg before knowing its offset is a bad idea. v3: rebase on top of change to previous patch in the serie Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: move ring debugfs into radeon_ring.cChristian König
Those debugfs files aren't r600 specific, so they shouldn't be in r600.c. Move them to radeon_ring.c and also add functionality to dump CP1 & CP2 ring informations. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: rename struct radeon_cp to radeon_ringChristian König
That naming seems to make more sense, since we not only want to run PM4 rings with it. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: disable compute rings on cayman for nowChristian König
Disable the additional compute rings on cayman until their setup is fully implemented. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: add radeon_fence_count_emited functionChristian König
Split counting of emited fences out of power management into a seperate function. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: make some asic pointers per ringChristian König
Emitting fences, semaphores and ib works differently on different ring, so its is easier to maintain separate functions for each ring. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: Add radeon_test_syncing function v2Christian König
Tests syncing between all rings by using semaphores and fences. v2: use radeon_testing as a bit flag rather than on/off switch this allow to test for one thing at a time (bo_move or semaphore test). It kind of break the usage if user wheren't using 1 for bo move test but as it's a test feature i believe it's ok. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: make cp variable an arrayChristian König
Replace cp, cp1 and cp2 members with just an array of radeon_cp structs. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: make ring rptr and wptr register offsets variableChristian König
Every ring seems to have the concept of read and write pointers. Make the register offset variable so we can use the functions for different types of rings. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: make all functions work with multiple rings.Christian König
Give all asic and radeon_ring_* functions a radeon_cp parameter, so they know the ring to work with. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon/kms: add support for semaphores v3Christian König
They are used to sync between rings, while fences sync between a ring and the cpu. v2 Fix radeon_semaphore_driver_fini when no semaphore were allocated. v3 Initialize list early on to avoid issue in case or early error Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon/kms: add support for multiple fence queues v2Alex Deucher
For supporting multiple CP ring buffers, async DMA engines and UVD. We still need a way to synchronize between engines. v2 initialize unused fence driver ring to avoid issue in suspend/unload Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: fix a spelling mistakeChristian König
Better fix it before this obvious typo spreads even more. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: no need to check all relocs for duplicatesChristian König
Only check the previously checked relocs for duplicates. Also leaving the handle uninitialized isn't such a good idea. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm/radeon: fix debugfs handling v3Christian König
Having registered debugfs files globally causes the files to not show up on the second, third etc.. card in the system. v2: fix crash on module unloading v3: fix space indentation Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500/oaktrail: panel display quality fixAlan Cox
The GCT setup was used on Moorestown. The Oaktrail version uses a normal PC interface. That means we must also honour the dither info from the BIOS data. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Oaktrail fixesAlan Cox
The move to connectors breaks Oaktrail again if we have memory poisoning enabled. Fix this. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20Merge tag 'v3.2-rc6' of /home/airlied/devel/kernel/linux-2.6 into drm-core-nextDave Airlie
Merge in the upstream tree to bring in the mainline fixes. Conflicts: drivers/gpu/drm/exynos/exynos_drm_fbdev.c drivers/gpu/drm/nouveau/nouveau_sgdma.c
2011-12-20gma500: Final enables for OaktrailAlan Cox
This switches the ifdef to match the Kconfig so that Oaktrail probing occurs and adds some additional minor bulletproofing. Tested on a Fujtisu Stylistic Q550 internal display. HDMI might work but that remains to be seen. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: SDVO DDC bus guessing isn't working so hardcode it insteadPatrik Jakobsson
We currently don't have support for parsing SDVO mappings from BIOS so we're guessing the bus switch parameter. This isn't working so hardcode it to a configuration known to work on most poulsbo hardware. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Convert Oaktrail to work with new output handlingPatrik Jakobsson
Replace psb_intel_output with psb_intel_encoder and psb_intel_connector Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> [Changed Moorestown reference to Oaktrail] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Convert Cedarview to work with new output handlingPatrik Jakobsson
Replace psb_intel_output with psb_intel_encoder and psb_intel_connector. Things will need to be cleaned up and tested so consider this an initial patch for Cedarview. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Replace SDVO code with slightly modified version from i915Patrik Jakobsson
Our current SDVO implementation is not working properly, so replace it with a modified version of the i915. Further testing and debugging is needed to make sure we can handle the different SDVO setups and wiring. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Add support for Intel GMBUSPatrik Jakobsson
Before we integrate the new SDVO code we need GMBUS support Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Convert PSB LVDS to new output handlingPatrik Jakobsson
LVDS for PSB now uses psb_intel_encoder and psb_intel_connectors instead of psb_intel_output. i2c_bus and ddc_bus are moved to lvds_priv. There was also a pointer to mode_dev (for no obvious reason) that we now get directly from dev_priv. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Fix encoder type checking for connectorsPatrik Jakobsson
Fix cases where we need to know what encoder type is behind a given connector. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Remove psb_intel_output from ddc_probe and ddc_get_modesPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Initial support for our encoder and connector structsPatrik Jakobsson
First step towards adding i915 alike encoder and connector abstractions. This will make life easier when adding i915 output code into our driver. It also removes the old psb_intel_output struct. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20staging/gma500: fixup staging code to build following core changes.Dave Airlie
This just fixes up the staging code to keep building. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: Replace pitch with pitches[] in drm_framebufferVille Syrjälä
Otherwise each driver would need to keep the information inside their own framebuffer object structure. Also add offsets[]. BOs on the other hand are driver specific, so those can be kept in driver specific structures. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: Check that the requested pixel format is validVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: plane: Check that the fb pixel format is supported by the planeVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: plane: Make 'formats' parameter to drm_plane_init() constVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: plane: Check crtc coordinates against integer overflows in setplane ioctlVille Syrjälä
Help drivers a little by guaranteeing that crtc_x+crtc_w and crtc_y+crtc_h don't overflow. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: plane: Check source coordinatesVille Syrjälä
Make sure the source coordinates stay within the buffer. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: plane: Clear plane.crtc and plane.fb after disable_plane()Ville Syrjälä
These are the only indication to user space that the plane was disabled. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: Fix __user sparse warningsVille Syrjälä
Several pointers and casts were missing __user annotations. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: plane: mutex_unlock() was missingVille Syrjälä
Unlock the mode_config mutex if drm_plane_init() fails. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20drm: fourcc: Use __u32 instead of u32Ville Syrjälä
drm_fourcc.h can be included from user space so use the appropriate types. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>