aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-04-25drm/bridge: adv7511: fix mode_valid's return typeLuc Van Oostenryck1-1/+1
The method struct drm_connector_helper_funcs::mode_valid is defined as returning an 'enum drm_mode_status' but the driver implementation for this method uses an 'int' for it. Fix this by using 'enum drm_mode_status' in the driver too. Signed-off-by: Luc Van Oostenryck <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-25drm/ast: fix mode_valid's return typeLuc Van Oostenryck1-1/+1
The method struct drm_connector_helper_funcs::mode_valid is defined as returning an 'enum drm_mode_status' but the driver implementation for this method uses an 'int' for it. Fix this by using 'enum drm_mode_status' in the driver too. Signed-off-by: Luc Van Oostenryck <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-25drm: adv7511: Add support for i2c_new_secondary_deviceKieran Bingham2-15/+33
The ADV7511 has four 256-byte maps that can be accessed via the main I2C ports. Each map has it own I2C address and acts as a standard slave device on the I2C bus. Allow a device tree node to override the default addresses so that address conflicts with other devices on the same bus may be resolved at the board description level. Signed-off-by: Kieran Bingham <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-25dt-bindings: adv7511: Extend bindings to allow specifying slave map addressesKieran Bingham1-2/+16
The ADV7511 has four 256-byte maps that can be accessed via the main I2C ports. Each map has it own I2C address and acts as a standard slave device on the I2C bus. Extend the device tree node bindings to be able to override the default addresses so that address conflicts with other devices on the same bus may be resolved at the board description level. Signed-off-by: Kieran Bingham <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm: Don't EXPORT drm_add/reset_display_infoDaniel Vetter3-4/+2
Only used within drm.ko, no need to tempt drivers. Cc: Keith Packard <[email protected]> Cc: Ville Syrjala <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/xen-front: use simple display pipe prepare_fb helperDaniel Vetter1-7/+1
I missed this one because on an older tree. Signed-off-by: Daniel Vetter <[email protected]> Cc: Oleksandr Andrushchenko <[email protected]> Cc: [email protected] Reviewed-by: Oleksandr Andrushchenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/atomic: better doc for implicit vs explicit fencingDaniel Vetter3-3/+21
Note that a pile of drivers don't seem to take implicit fencing into account, or at least don't call drm_atoimc_set_fence_for_plane(). Cc'ing relevant people, or at least some. Some drivers also look like they don't disable implicit fencing (e.g. amdgpu) because the explicit fences and implicit fences are handled by entirely independent code paths. I also wonder whether we shouldn't just make the recommended helpers the default ones, since a lot of drivers don't bother to handle the implicit fences at all it seems. The helpers won't blow up even for non-GEM drivers or GEM drivers which don't fill out the gem bo pointers in struct drm_framebuffer. v2: Comments from Eric. Cc: Gerd Hoffmann <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Harry Wentland <[email protected]> Cc: Sinclair Yeh <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Sean Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/mxsfb: Use simple_display_pipe prepare_fb helperDaniel Vetter1-7/+1
Signed-off-by: Daniel Vetter <[email protected]> Cc: Marek Vasut <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/pl111: Use simple_display_pipe prepare_fb helperDaniel Vetter1-7/+1
Signed-off-by: Daniel Vetter <[email protected]> Cc: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/tve200: Use simple_display_pipe prepare_fb helperDaniel Vetter1-7/+1
Signed-off-by: Daniel Vetter <[email protected]> Cc: Linus Walleij <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm: Move simple_display_pipe prepare_fb helper into gem fb helpersDaniel Vetter10-24/+31
There's nothing tinydrm specific to this, and there's a few more copies of the same in various other drivers. Signed-off-by: Daniel Vetter <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: David Lechner <[email protected]> Cc: "Noralf Trønnes" <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Daniel Stone <[email protected]> Cc: Haneen Mohammed <[email protected]> Cc: Ben Widawsky <[email protected]> Cc: "Ville Syrjälä" <[email protected]> Reviewed-by: Oleksandr Andrushchenko <[email protected]> Acked-by: David Lechner <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/vmwgfx: Remove no-op prepare/cleanup_fb callbacksDaniel Vetter1-35/+0
Less hits to go through when I git grep over all drivers. These callbacks are optional. Signed-off-by: Daniel Vetter <[email protected]> Cc: VMware Graphics <[email protected]> Cc: Sinclair Yeh <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Cc: Thomas Hellstrom <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad Mixx 320Hans de Goede1-9/+10
The Lenovo Ideapad Mixx 320 laptop uses a portrait LCD panel, add a quirk for this. While at it instead of duplicating the same drm_dmi_panel_orientation_data for 3 laptops add a generic lcd800x1280_rightside_up orientation_data and use that for all 3 (including the new Mixx 320 entry). Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad Mixx 310Hans de Goede1-0/+17
Some production batches of the Lenovo Ideapad Mixx 310 laptop use a portrait LCD panel, add a quirk for this. Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: psr: Remove flush by CRTCTomasz Figa2-36/+0
It is not used anymore after last changes and it was not even correct to begin with as it assumed a 1:1 relation between a CRTC and encoder, while in fact a CRTC can be attached to multiple encoders. Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: Disallow PSR for the whole atomic commitTomasz Figa2-8/+60
Currently PSR flush is triggered from CRTC's .atomic_begin() callback, which is executed after modeset disables and enables and before plane updates are committed. Since PSR flush and re-enable can be triggered asynchronously by external sources (input event, delayed work), it can race with hardware programming done in the aforementioned stages. This patch blocks the PSR completely before hardware programming part begins and unblock after it ends. This relies on reference counted PSR disable introduced with previous patch. Cc: Kristian H. Kristensen <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: psr: Sanitize semantics of allow/inhibit APITomasz Figa3-17/+46
Currently both rockchip_drm_psr_activate() and _deactivate() only set the boolean "active" flag without actually making sure that hardware state complies with it. Since we are going to extend the usage of this API to properly lock PSR for the duration of atomic commits, we change the semantics in following way: - a counter is used to track the number of inhibit requests, - PSR is actually disabled in hardware on first inhibit request, - PSR enable work is scheduled on last allow request. The above allows using the API as a way to deterministically synchronize PSR state changes with other DRM events, i.e. atomic commits and cursor updates. As a nice side effect, the naming is sorted out and we have "inhibit" for stopping the software logic and "enable" for hardware state. Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: psr: Avoid redundant calls to .set() callbackTomasz Figa1-56/+24
The first time after we call rockchip_drm_do_flush() after rockchip_drm_psr_register(), we go from PSR_DISABLE to PSR_FLUSH. The difference between PSR_DISABLE and PSR_FLUSH is whether or not we have a delayed work pending - PSR is off in either state. However psr_set_state() only catches the transition from PSR_FLUSH to PSR_DISABLE (which never happens), while going from PSR_DISABLE to PSR_FLUSH triggers a call to psr->set() to disable PSR while it's already disabled. This triggers the eDP PHY power-on sequence without being shut down first and this seems to occasionally leave the encoder unable to later enable PSR. Let's just simplify the state machine and simply consider PSR_DISABLE and PSR_FLUSH the same state. Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: analogix_dp: Do not call Analogix code before bindTomasz Figa1-0/+9
Driver callbacks, such as system suspend or resume can be called any time, specifically they can be called before the component bind callback. Let's use dp->adp pointer as a safeguard and skip calling Analogix entry points if it is an ERR_PTR(). Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Split the platform-specific poweron in two partsDouglas Anderson4-6/+18
Some of the platform-specific stuff in rockchip_dp_poweron() needs to happen before the generic code. Some needs to happen after. Let's split the callback in two. Specifically we can't start doing PSR work until _after_ the whole controller is up, so don't set the enable until the end. Cc: Kristian H. Kristensen <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> [seanpaul added exynos change] Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: pre dither down when output bpc is 8bitMark Yao5-0/+11
Some encoder have a crc verification check, crc check fail if input and output data is not equal. That means encoder input and output need use same color depth, vop can output 10bit data to encoder, but some panel only support 8bit depth, that would make crc check die. So pre dither down vop data to 8bit if panel's bpc is 8. Signed-off-by: Mark Yao <[email protected]> [seanpaul resolved conflict in rockchip_drm_vop.c] Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Properly disable aux chan retries on rockchipDouglas Anderson1-7/+8
The comments in analogix_dp_init_aux() claim that we're disabling aux channel retries, but then right below it for Rockchip it sets them to 3. If we actually need 3 retries for Rockchip then we could adjust the comment, but it seems more likely that we want the same retry behavior across all platforms. Cc: Stéphane Marchesin <[email protected]> Cc: 征增 王 <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Properly log AUX CH errorsDouglas Anderson1-8/+5
The code in analogix_dp_transfer() that was supposed to print out: AUX CH error happened Was actually dead code. That's because the previous check (whether the interrupt status indicated any errors) would have hit for all errors anyway. Let's combine the two error checks so we can actually see AUX CH errors. We'll also downgrade the message to a warning since some of these types of errors might be expected for some displays. If this gets too noisy we can downgrade again to debug. Cc: 征增 王 <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Reorder plat_data->power_off to happen soonerDouglas Anderson1-2/+3
The current user of the analogix power_off is "analogix_dp-rockchip". That driver does this: - deactivate PSR - turn off a clock Both of these things (especially deactive PSR) should be done before we turn the PHY power off and turn off analog power. Let's move the callback up. Note that without this patch (and with https://patchwork.kernel.org/patch/9553349/ [seanpaul: this patch was not applied, but it seems like the race can still occur]), I experienced an error in reboot testing where one thread was at: rockchip_drm_psr_deactivate rockchip_dp_powerdown analogix_dp_bridge_disable drm_bridge_disable ...and the other thread was at: analogix_dp_send_psr_spd analogix_dp_enable_psr analogix_dp_psr_set psr_flush_handler The flush handler thread was finding AUX channel errors and eventually reported "Failed to apply PSR", where I had a kgdb breakpoint. Presumably the device would have eventually given up and shut down anyway, but it seems better to fix the order to be more correct. Cc: Kristian H. Kristensen <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Move fast link training detect to set_bridgezain wang1-16/+26
It's too early to detect fast link training, if other step after it failed, we will set fast_link flag to 1, and retry set_bridge again. In this case we will power down and power up panel power supply, and we will do fast link training since we have set fast_link flag to 1. In fact, we should do full link training now, not the fast link training. So we should move the fast link detection at the end of set_bridge. Cc: Tomasz Figa <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Fix incorrect operations with register ↵zain wang2-5/+16
ANALOGIX_DP_FUNC_EN_1 Register ANALOGIX_DP_FUNC_EN_1(offset 0x18), Rockchip is different to Exynos: on Exynos edp phy, BIT 7 MASTER_VID_FUNC_EN_N BIT 6 reserved BIT 5 SLAVE_VID_FUNC_EN_N on Rockchip edp phy, BIT 7 reserved BIT 6 RK_VID_CAP_FUNC_EN_N BIT 5 RK_VID_FIFO_FUNC_EN_N So, we should do some private operations to Rockchip. Cc: Tomasz Figa <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Fix timeout of video streamclk configzain wang1-2/+3
The STRM_VALID bit in register ANALOGIX_DP_SYS_CTL_3 may be unstable, so we may hit the error log "Timeout of video streamclk ok" since checked this unstable bit. In fact, we can go continue and the streamclk is ok if we wait enough time, it does no effect on display. Let's change this error to warn. Cc: Douglas Anderson <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pllzain wang1-8/+12
There is no register named ANALOGIX_DP_PLL_CTL in Rockchip edp phy reg list. We should use BIT_4 in ANALOGIX_DP_PD to control the pll power instead of ANALOGIX_DP_PLL_CTL. Cc: Douglas Anderson <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/rockchip: Restore psr->state when enable/disable psr failedzain wang4-14/+22
If we failed disable psr, it would hang the display until next psr cycle coming. So we should restore psr->state when it failed. Cc: Tomasz Figa <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Reset aux channel if an error occurredLin Huang1-4/+14
AUX errors are caused by many different reasons. We may not know what happened in aux channel on failure, so let's reset aux channel if some errors occurred. Cc: 征增 王 <[email protected]> Cc: Douglas Anderson <[email protected]> Signed-off-by: Lin Huang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Fix AUX_PD bit for Rockchipzain wang2-54/+65
There are some different bits between Rockchip and Exynos in register "AUX_PD". This patch fixes the incorrect operations about it. Cc: Douglas Anderson <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Check dpcd write/read statusLin Huang1-42/+127
We need to check the dpcd write/read return value to see whether the write/read was successful Cc: Kristian H. Kristensen <[email protected]> Signed-off-by: Lin Huang <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Fix incorrect usage of enhanced modezain wang1-4/+2
Enhanced mode is required by the eDP 1.2 specification, and not doing it early could result in a period of time where we have a link transmitting idle packets without it. Since there is no reason to disable it, we just enable it at the beginning of link training and then keep it on all the time. Cc: Tomasz Figa <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Extend hpd check time to 100msLin Huang1-1/+1
There was a 1ms delay to detect the hpd signal, which is too short to detect a short pulse. This patch extends this delay to 100ms. Cc: Stéphane Marchesin <[email protected]> Cc: 征增 王 <[email protected]> Signed-off-by: Lin Huang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Ensure edp is disabled when shutting down the panelLin Huang1-0/+11
When panel is shut down, we should make sure edp can be disabled to avoid undefined behavior. Cc: Stéphane Marchesin <[email protected]> Signed-off-by: Lin Huang <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Set PD_INC_BG first when powering up edp phyzain wang2-2/+11
Following the correct power up sequence: dp_pd=ff => dp_pd=7f => wait 10us => dp_pd=00 Cc: Stéphane Marchesin <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Wait for HPD signal before configuring linkzain wang1-0/+11
According to DP spec v1.3 chap 3.5.1.2 Link Training, Link Policy Maker must first detect that the HPD signal is asserted high by the Downstream Device before establishing a link with it. Cc: Stéphane Marchesin <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Retry bridge enable when it failedzain wang3-17/+56
When we enable bridge failed, we have to retry it, otherwise we would get the abnormal display. Cc: Stéphane Marchesin <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Don't use fast link training when panel just powered upzain wang2-5/+6
Panel would reset its setting when it powers down. It would forget the last succeeded link training setting. So we can't use the last successful link training setting to do fast link training. Let's reset fast_train_enable in analogix_dp_bridge_disable(); Cc: Stéphane Marchesin <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Check AUX_EN status when doing AUX transferLin Huang1-11/+14
We should check AUX_EN bit to confirm the AUX CH operation is completed. Cc: Stéphane Marchesin <[email protected]> Signed-off-by: Lin Huang <[email protected]> Signed-off-by: zain wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-24drm/bridge: analogix_dp: Move enable video into config_video()Lin Huang1-6/+5
We need to enable video before analogix_dp_is_video_stream_on(), so we can get the right video stream status. We needed to increase the delay in the timeout loop because there is random "Timeout of video streamclk ok" message happen when debug edp panel, this time do not define in the spec. Cc: 征增 王 <[email protected]> Cc: Stéphane Marchesin <[email protected]> Signed-off-by: Lin Huang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Thierry Escande <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-23drm/vc4: Add CTM registers to debugfsStefan Schake1-0/+4
Now that we set the OLED* registers to do CTM, it's helpful to have them in the register dump. Signed-off-by: Stefan Schake <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-23drm/vc4: Add CTM supportStefan Schake4-1/+215
The hardware has a single block for applying a CTM prior to gamma lut. It can be fed with pixels from one of our CRTC at a time and uses a matrix with S0.9 scalars. Use private atomic state to reject attempts from userland to apply CTM for more than one CRTC at a time and reject matrices with scalars that we can't approximate without integer bits. Signed-off-by: Stefan Schake <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/218067/
2018-04-23drm/vc4: Add support for plane alphaStefan Schake2-4/+18
The HVS supports mixing fixed alpha with per-pixel alpha or setting a fixed plane alpha in case there is no per-pixel information. This allows us to support the generic DRM plane alpha property. Signed-off-by: Stefan Schake <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-23gpu: drm: vc4: simplify getting .drvdataWolfram Sang1-2/+1
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-23dt-bindings: drm/bridge: Document Cadence DSI bridge bindingsBoris Brezillon1-0/+133
Document the bindings used for the Cadence DSI bridge. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-23drm/bridge: Add Cadence DSI driverBoris Brezillon3-0/+1634
Add a driver for Cadence DPI -> DSI bridge. This driver only support a subset of Cadence DSI bridge capabilities. This driver has been tested/debugged in a simulated environment which explains why some of the features are missing. Here is a non-exhaustive list of missing features: * burst mode * DPHY init/configuration steps * support for additional input interfaces (SDI input) DSI commands and non-burst video mode have been tested. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-23drm: dw-hdmi-i2s: Remove owner assignment from platform_driverFabio Estevam1-1/+0
platform_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-20drm: bridge: Add thc63lvd1024 LVDS decoder driverJacopo Mondi3-0/+213
Add DRM bridge driver for Thine THC63LVD1024 LVDS to digital parallel output converter. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-04-20dt-bindings: display: bridge: Document THC63LVD1024 LVDS decoderJacopo Mondi1-0/+60
Document Thine THC63LVD1024 LVDS decoder device tree bindings. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]