2013-06-17 19:48:27 +08:00
|
|
|
/*
|
|
|
|
* rcar_du_lvdsenc.h -- R-Car Display Unit LVDS Encoder
|
|
|
|
*
|
2014-02-07 01:13:52 +08:00
|
|
|
* Copyright (C) 2013-2014 Renesas Electronics Corporation
|
2013-06-17 19:48:27 +08:00
|
|
|
*
|
|
|
|
* Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RCAR_DU_LVDSENC_H__
|
|
|
|
#define __RCAR_DU_LVDSENC_H__
|
|
|
|
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
|
|
|
|
struct rcar_drm_crtc;
|
|
|
|
struct rcar_du_lvdsenc;
|
|
|
|
|
|
|
|
enum rcar_lvds_input {
|
|
|
|
RCAR_LVDS_INPUT_DU0,
|
|
|
|
RCAR_LVDS_INPUT_DU1,
|
|
|
|
RCAR_LVDS_INPUT_DU2,
|
|
|
|
};
|
|
|
|
|
2016-10-03 18:07:02 +08:00
|
|
|
/* Keep in sync with the LVDCR0.LVMD hardware register values. */
|
|
|
|
enum rcar_lvds_mode {
|
|
|
|
RCAR_LVDS_MODE_JEIDA = 0,
|
|
|
|
RCAR_LVDS_MODE_MIRROR = 1,
|
|
|
|
RCAR_LVDS_MODE_VESA = 4,
|
|
|
|
};
|
|
|
|
|
2013-06-17 19:48:27 +08:00
|
|
|
#if IS_ENABLED(CONFIG_DRM_RCAR_LVDS)
|
|
|
|
int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu);
|
2016-10-03 18:07:02 +08:00
|
|
|
void rcar_du_lvdsenc_set_mode(struct rcar_du_lvdsenc *lvds,
|
|
|
|
enum rcar_lvds_mode mode);
|
2015-02-20 20:59:58 +08:00
|
|
|
int rcar_du_lvdsenc_enable(struct rcar_du_lvdsenc *lvds,
|
|
|
|
struct drm_crtc *crtc, bool enable);
|
2015-09-07 20:44:44 +08:00
|
|
|
void rcar_du_lvdsenc_atomic_check(struct rcar_du_lvdsenc *lvds,
|
|
|
|
struct drm_display_mode *mode);
|
2013-06-17 19:48:27 +08:00
|
|
|
#else
|
|
|
|
static inline int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-10-03 18:07:02 +08:00
|
|
|
static inline void rcar_du_lvdsenc_set_mode(struct rcar_du_lvdsenc *lvds,
|
|
|
|
enum rcar_lvds_mode mode)
|
|
|
|
{
|
|
|
|
}
|
2015-02-20 20:59:58 +08:00
|
|
|
static inline int rcar_du_lvdsenc_enable(struct rcar_du_lvdsenc *lvds,
|
|
|
|
struct drm_crtc *crtc, bool enable)
|
2013-06-17 19:48:27 +08:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2015-09-07 20:44:44 +08:00
|
|
|
static inline void rcar_du_lvdsenc_atomic_check(struct rcar_du_lvdsenc *lvds,
|
|
|
|
struct drm_display_mode *mode)
|
|
|
|
{
|
|
|
|
}
|
2013-06-17 19:48:27 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __RCAR_DU_LVDSENC_H__ */
|