mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/rockchip: cdn-dp: Add bus format setting
Change-Id: Id54d3dcf00dc1d535783674d3a57309469d279f3 Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/reset.h>
|
||||
#include <uapi/linux/videodev2.h>
|
||||
|
||||
#include <sound/hdmi-codec.h>
|
||||
|
||||
@@ -742,11 +743,25 @@ static int cdn_dp_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state)
|
||||
{
|
||||
struct cdn_dp_device *dp = encoder_to_dp(encoder);
|
||||
struct drm_display_info *di = &dp->connector.display_info;
|
||||
struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);
|
||||
|
||||
switch (di->bpc) {
|
||||
case 6:
|
||||
s->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI;
|
||||
break;
|
||||
case 8:
|
||||
default:
|
||||
s->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
break;
|
||||
}
|
||||
|
||||
s->output_mode = ROCKCHIP_OUT_MODE_AAAA;
|
||||
s->output_type = DRM_MODE_CONNECTOR_DisplayPort;
|
||||
s->tv_state = &conn_state->tv;
|
||||
s->eotf = HDMI_EOTF_TRADITIONAL_GAMMA_SDR;
|
||||
s->color_encoding = DRM_COLOR_YCBCR_BT709;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user