OSDN Git Service

drm: rcar-du: lvds: Get mode from state
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 15 Oct 2019 23:06:52 +0000 (02:06 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 18 Dec 2019 00:40:11 +0000 (02:40 +0200)
commit593885b085d699c9f49992c3ea50f372e0c7008d
treef1a7395c629b3455cc6699960c309c9b253225cc
parent7b627ce80fbd05885b27f711a5f9820f2b40749a
drm: rcar-du: lvds: Get mode from state

The R-Car LVDS encoder driver implements the bridge .mode_set()
operation for the sole purpose of storing the mode in the LVDS private
data, to be used later when enabling the encoder.

Switch to the bridge .atomic_enable() and .atomic_disable() operations
in order to access the global atomic state, and get the mode from the
state instead. Remove both the unneeded .mode_set() operation and the
display_mode and mode fields storing state data from the rcar_lvds
private structure.

As a side effect we get the CRTC from the state, replace the CRTC
pointer retrieved through the bridge's encoder that shouldn't be used by
atomic drivers.

While at it, clarify a few error messages in rcar_lvds_get_lvds_mode()
and turn them into warnings as they are not fatal.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Tested-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
drivers/gpu/drm/rcar-du/rcar_lvds.c