aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-03-24drm/gma500: add locking to fixed panel edid probingDaniel Vetter3-0/+11
With the recent addition of locking checks in commit 62ff94a5492175759546f8bc61383189d6b49122 Author: Daniel Vetter <[email protected]> AuthorDate: Thu Jan 23 22:18:47 2014 +0100 drm/crtc-helper: remove LOCKING from kerneldoc drm_add_edid_modes started to WARN about the mode_config.mutex not being held in the lvds and dp initialization code. Now since this is init code locking is fairly redudant if it wouldn't be for the drm core registering sysfs files a bit early. And the locking WARNINGs nicely enforce that indeed all access to the mode lists are properly protected. And a full audit shows that only i915 and gma500 touch the modes lists at init time. Hence I've opted to wrap up this entire mode detection sequence for fixed panels with the mode_config mutex for both lvds and edp outputs. Cc: Patrik Jakobsson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Acked-by: Patrik Jakobsson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-03-24drm/i915: add locking to fixed panel edid probingDaniel Vetter2-0/+7
With the recent addition of locking checks in commit 62ff94a5492175759546f8bc61383189d6b49122 Author: Daniel Vetter <[email protected]> AuthorDate: Thu Jan 23 22:18:47 2014 +0100 drm/crtc-helper: remove LOCKING from kerneldoc drm_add_edid_modes started to WARN about the mode_config.mutex not being held in the lvds and dp initialization code. Now since this is init code locking is fairly redudant if it wouldn't be for the drm core registering sysfs files a bit early. And the locking WARNINGs nicely enforce that indeed all access to the mode lists are properly protected. And a full audit shows that only i915 and gma500 touch the modes lists at init time. Hence I've opted to wrap up this entire mode detection sequence for fixed panels with the mode_config mutex for both lvds and edp outputs. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-03-24drm/exynos: fimd: remove unused variableAndrzej Hajda1-14/+6
The patch removes unused vidcon0 field from fimd_context structure. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24ARM: dts: exynos4210-universal: add exynos/fimd nodeAndrzej Hajda1-0/+27
The patch adds fimd node with display timings for exynos4210-universal device. It also makes LCD regulators always on. This allow to re-use panel initialized by boot loader. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: restore parallel output interface supportAndrzej Hajda5-0/+360
The patch adds parallel output interface to FIMD device driver. It also restores support for panels initialized by boot loader, but without proper kernel driver. Driver uses video interface bindings to find connected panel. It uses drm_panel interface to interact with the panel. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24exynos/fimd: add parallel output related bindingsAndrzej Hajda1-0/+15
The patch adds bindings required to add support for parallel output. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: correct timing porch conversionAndrzej Hajda1-7/+5
The patch corrects porch calculation. It should be calculated as a difference between adjacent respective fields of drm_display_mode. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Daniel Kurtz <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: init kms poll after creation of connectorsAndrzej Hajda1-3/+3
KMS poll init helper should be run when connectors are created, otherwise it will not schedule connection detector. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: delay fbdev initialization until an output is connectedAndrzej Hajda2-12/+7
In case fbdev is initialized before any output is connected, fb resolution defaults to 1024x768. After that any output with bigger resolution is ignored and fbdev is not displayed. The patch postpones fbdev initialization to avoid such situation. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: fix unnecessary resource cleanupInki Dae1-3/+2
This patch removes unnecessary drm_mode_config_cleanup call. Signed-off-by: Inki Dae <[email protected]> Signed-off-by: Kyungmin Park <[email protected]>
2014-03-24drm/exynos: hdmi: use i2c_adapter instead of i2c_clientInki Dae1-8/+8
This patch changes i2c_client for ddc to i2c_adapter because ddc needs only i2c_adapter. Signed-off-by: Inki Dae <[email protected]> Signed-off-by: Kyungmin Park <[email protected]>
2014-03-24drm/exynos: hdmi: consider APB PHYInki Dae1-3/+23
This patch returns error in case of using APB PHY. Exynos5420 SoC and maybe later would use APB PHY instead of I2C PHY so such case should be considered. Signed-off-by: Inki Dae <[email protected]> Signed-off-by: Kyungmin Park <[email protected]>
2014-03-24drm/exynos: Remove the exynos_drm_connector shimSean Paul4-29/+6
This path removes the exynos_drm_connector code since it was just passing hooks through display_ops. The individual device drivers are now responsible for implementing drm_connector directly. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Implement lvds bridge discovery to DP driverSean Paul1-0/+41
This patch implements the lvds bridge discovery and connector pre-emption code to the dp driver. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/bridge: Add PTN3460 bridge driverSean Paul7-0/+423
This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS bridge chip. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Implement drm_connector directly in vidi driverSean Paul1-54/+108
This patch implements drm_connector directly in the vidi driver, this will allow us to move away from the exynos_drm_connector layer. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Implement drm_connector directly in dp driverSean Paul2-9/+94
This patch implements drm_connector directly in the dp driver, this will allow us to move away from the exynos_drm_connector layer. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Implement drm_connector in hdmi directlySean Paul1-41/+85
This patch implements drm_connector in the hdmi driver directly, instead of using exynos_drm_connector. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Add create_connector callbackSean Paul2-0/+5
This creates a new display hook called create_connector. The purpose is to allow the display driver to create its own drm_connector instead of using the exynos_drm_connector. This moves things closer to completely removing the exynos_drm_connector abstraction. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Consolidate suspend/resume in drm_drvSean Paul5-288/+170
This patch removes all of the suspend/resume logic from the individual drivers and consolidates it in drm_drv. This consolidation reduces the number of functions which enable/disable the hardware to just one -- the dpms callback. This ensures that we always power up/down in a consistent manner. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Clean up FIMD power on/off routinesSean Paul1-111/+134
This patch separates the fimd_activate function into poweron/poweroff functions to be more consistent with the other drivers in exynos drm. It also properly cleans up after failures in poweron. The functions have also been shuffled around such that they are all in the same spot in the file and poweron/poweroff can be called from the dpms function. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Implement dpms display callback in DPSean Paul2-62/+81
This patch implements the dpms display callback for the DP driver. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Move display implementation into dpSean Paul7-86/+131
This patch moves the exynos_drm_display implementation from fimd into the dp driver. This will allow for tighter integration of the dp driver into the exynos drm driver. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Move dp driver from video/ to drm/Sean Paul9-14/+8
This patch moves the code from video/ to drm/. This is required the DP driver needs to power on/off in the correct order in relation to fimd. This will also allow the DP driver to participate in drm modeset as well as provide accurate connection detection and edid. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Remove unused/useless fimd_context membersSean Paul1-12/+1
This patch removes a few fimd_context members which are either entirely unused or unneeded. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Use mode_set to configure fimdSean Paul1-69/+74
This patch uses the mode passed into mode_set to configure fimd instead of directly using the panel from context. This will allow us to move the exynos_drm_display implementation out of fimd, where it doesn't belong. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Implement mode_fixup manager operationSean Paul2-1/+10
This patch adds a new manager callback for mode_fixup and pipes it through exynos_drm_crtc. This will allow the manager drivers to alter the mode during modeset. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Add mode_set manager operationSean Paul2-0/+7
This patch adds a mode_set callback to the manager operations which sets the crtc's current mode to the manager driver. This will allow the fimd driver to set its mode using values from drm, instead of the dt. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Disable unused crtc planes from crtcSean Paul2-63/+15
This patch moves the code which disables unused crtc planes from the encoder to the crtc. Since there is a 1:1 encoder/crtc mapping in exynos, the only valid crtc change the pre-existing code could catch is disconnecting an active crtc from the encoder. Thus it is functionally equivalent to just disable all planes attached to a crtc when the crtc is disabled. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Use drm_mode_copy to copy modesSean Paul1-9/+1
This patch changes the manual copying of mode to adjusted_mode in mode_fixup to use drm_mode_copy instead of handling things manually. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Remove exynos_drm_hdmi shimSean Paul7-658/+217
This patch trims exynos_drm_hdmi out of the driver. The reason it existed in the first place was to make up for the mixture of display/overlay/manager ops being spread across hdmi and mixer. With that code now rationalized, mixer and hdmi map directly to exynos_drm_crtc and exynos_drm_encoder, respectively. Since there is a 1:1 mapping, we no longer need this layer. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: hdmi: remove the i2c drivers and useDaniel Kurtz3-33/+32
The i2c client was previously being passed into the hdmi driver via a dedicated i2c driver, and then a global variable. This patch removes all of that and just uses the device tree to get the i2c_client. This patch also properly references the client so we don't lose it before we're done with it. Signed-off-by: Daniel Kurtz <[email protected]> [seanpaul changed to phandle lookup instead of using of node name] Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Split manager/display/subdrvSean Paul14-709/+641
This patch splits display and manager from subdrv. The result is that crtc functions can directly call into manager callbacks and encoder functions can directly call into display callbacks. This will allow us to remove the exynos_drm_hdmi shim and support mixer/hdmi & fimd/dp with common code. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Use unsigned long for possible_crtcsSean Paul5-5/+5
Change all instances of possible_crtcs in the exynos drm driver to be unsigned long. This matches the type used in the drm layer. Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Don't keep dpms state in encoderSean Paul1-17/+0
This patch removes the dpms state tracking in encoder. This state is at best confusing and at worst incorrect since the display drivers can turn on and off without propagating the value. Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Rename display_op power_on to dpmsSean Paul7-27/+10
This patch renames the display_op power_on to dpms to accurately reflect what the function does. The side-effect of this patch is that the new hdmi dpms callback is now invoked twice in the dpms path. This is safe and will be dealt with when the exynos_drm shim goes away. Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Remove dpms link between encoder/connectorSean Paul3-88/+8
This patch removes the call from encoder dpms into connector dpms (which will then call back into encoder dpms through the helper function). The callback is likely to keep connector->dpms in the right state when initiating dpms from crtc or encoder, but this isn't the right way to do it. This patch is the first step towards rationalizing power management in the exynos drm driver. Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Remove apply manager callbackSean Paul7-43/+8
This patch removes the apply() manager callback in favor of putting the relevant commits in the individual drivers. This will mitigate some of the difference between the suspend/resume path and the dpms path Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Pass exynos_drm_manager in manager ops instead of devSean Paul6-153/+180
This patch changes the manager ops callbacks from accepting the subdrv device pointer to taking a pointer to the manager. This will allow us to move closer to decoupling manager/display from subdrv, and subsequently decoupling the crtc/plane from the encoder. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: hdmi: Implement initialize op for hdmiSean Paul4-188/+219
This patch implements the initialize callback in the hdmi and mixer manager. This allows us to get rid of drm_dev in the drm_hdmi level and track it in the mixer and hdmi drivers. This is one of the things holding back the complete removal of the drm_hdmi layer. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Use manager_op initialize in fimdSean Paul1-4/+15
This patch implements the intitialize manager op in fimd. This will allow us to keep track of drm_dev in context instead of using subdev, which in turn makes it easier to remove subdev from fimd. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Add an initialize function to manager and displaySean Paul2-0/+26
This patch adds an initialize function to the manager and display operations. This allows them to keep track of drm_device in their local context, as well as adds an initialization hook right after the encoder is created. Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Merge overlay_ops into manager_opsSean Paul6-89/+62
This patch merges overlay_ops into manager_ops. In all cases, overlay_ops is implemented in the same place as manager ops, it doesn't serve a functional purpose, and doesn't make things more clear. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Remove useless slab.h includeStephane Marchesin1-1/+0
Signed-off-by: Stephane Marchesin <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: set the active aspect ratio as per modeShirish S1-7/+28
Now that the drm_display_mode also provides aspect ratio for all resolutions, this patch adds its usage to set the active aspect ratio of AVI info frame packets as per CEA-861-D standard's Table 9. This is also needed to abide by the 7-27 compliance test of HDMI. Signed-off-by: Shirish S <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: add phy settings for RB resolutionsShirish S1-0/+45
This patch adds support for the below mentioned pixel clocks in Exynos5250. Without them, following display modes won¡¯t be supported: 71 MHz - 1280x800@60Hz RB 73.25 MHz - 800x600@120Hz RB 88.75 MHz - 1440x900@60Hz RB 115.5 MHz - 1024x768@120Hz RB 119 MHz - 1680x1050@60Hz RB Signed-off-by: Shirish S <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-24drm/exynos: Fix (more) freeing issues in exynos_drm_drv.cDaniel Kurtz1-3/+7
The following commit [0] fixed a use-after-free, but left the subdrv open in the error path. [0] commit 6ca605f7c70895a35737435f17ae9cc5e36f1466 drm/exynos: Fix freeing issues in exynos_drm_drv.c Signed-off-by: Daniel Kurtz <[email protected]> Acked-by: Sachin Kamat <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2014-03-22drm/helper: lock all around force mode restoreDave Airlie1-0/+2
Since Daniel documented things with a sledge hammer, we got lots of nice backtraces in suspend/resume operations, I've check the callers of this and they all seems safe to me, This fixes one set of warns I reported. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-03-22drm/fb-helper: improve drm_fb_helper_initial_config lockingDaniel Vetter1-0/+2
The locking in drm_fb_helper_initial_config is a bit troublesome for a few reasons: - We can't just wrap the entire function up into modeset locks since the fbdev registration might call down into fbcon code, which then through our ->set_par implementation needs to be able to grab all modeset locks. So we'd have a neat deadlock. - This implies though that all current callers don't hold any modeset locks by necessity, so we have free reign to grab any modeset locks we need to grab. - The private state of the fbdev helper doesn't need any protection through locks, since once we have the fbdev registered it is mostly invariant or protected through the modeset locking in ->set_par and other callbacks. We can fully rely on driver having non-racy setup sequences here. For the initial config computation we actually may not grab locks since drivers which provide their own magic sauce (like i915) might need to grab locks themselves. - We should grab locks though when we probe outputs. Currently there's not much risk, but already now userspace could start poking at sysfs files and so probe concurrently. I expect that in the future driver init will be much more async, and since probing is really time-consuming this is a prime candidate. - We must not hold any crtc->mutex locks while calling probe functions since those might need to lock a crtc for e.g. load detection. i915 is such a driver. Also it's the probing calls which hit upon piles of new locking asserts I've recently added in commit 62ff94a5492175759546f8bc61383189d6b49122 Author: Daniel Vetter <[email protected]> Date: Thu Jan 23 22:18:47 2014 +0100 drm/crtc-helper: remove LOCKING from kerneldoc and commit 63951385052f7974155fa38f962f0f4e9847f90a Author: Daniel Vetter <[email protected]> Date: Thu Jan 23 15:14:15 2014 +0100 drm/doc: Repleace LOCKING kerneldoc sections in drm_modes.c Hence the right fix is to grab the mode_config mutex, but only that and only right around the probe calls. It seems to be sufficient to shut up all the locking WARNINGs I see on i915 and nouveau in drm_fb_helper_initial_config. Signed-off-by: Daniel Vetter <[email protected]> Tested-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-03-22drm/crtc-helper: fix locking for drm_helper_disable_unused_functionsDaniel Vetter1-14/+21
We have two calling contexts for thise function: - In the crtc helper code itself as part of the ->set_config implementation. In this calling context all modeset locks are already held, as they should. - In drivers not implementing fastboot before the fbdev/fbcon setup and initialization. This has been added for all drivers in commit 76a39dbfb2d1bc45219839e5a95d4ceaf6ca114f Author: Daniel Vetter <[email protected]> Date: Sun Jan 20 23:12:54 2013 +0100 drm/fb-helper: don't disable everything in initial_config In this calling context we do not hold any modeset locks since the immediately following call to initialize the fbev emulation grabs all these locks themselves. - There are two exceptions to the above rule: shmob doesn't have fbdev emulation support. I've manually checked the callchain up to the driver load function and no kms locks are held. The right fix therefore is to split this helper into an internal and external version and add the required locking to the function exported to drivers. This remedies locking inconsistencies exposed by me adding locking WARNs as part of the recent kerneldoc abi polishing done in commit 62ff94a5492175759546f8bc61383189d6b49122 Author: Daniel Vetter <[email protected]> Date: Thu Jan 23 22:18:47 2014 +0100 drm/crtc-helper: remove LOCKING from kerneldoc and commit 63951385052f7974155fa38f962f0f4e9847f90a Author: Daniel Vetter <[email protected]> Date: Thu Jan 23 15:14:15 2014 +0100 drm/doc: Repleace LOCKING kerneldoc sections in drm_modes.c v2: It helps when I actually git add the entire thing. Cc: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Tested-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>