| .. | .. |
|---|
| 107 | 107 | ROCKCHIP_COLOR_BAR_VERTICAL = 2, |
|---|
| 108 | 108 | }; |
|---|
| 109 | 109 | |
|---|
| 110 | +enum rockchip_drm_split_area { |
|---|
| 111 | + ROCKCHIP_DRM_SPLIT_UNSET = 0, |
|---|
| 112 | + ROCKCHIP_DRM_SPLIT_LEFT_SIDE = 1, |
|---|
| 113 | + ROCKCHIP_DRM_SPLIT_RIGHT_SIDE = 2, |
|---|
| 114 | +}; |
|---|
| 115 | + |
|---|
| 110 | 116 | struct rockchip_drm_sub_dev { |
|---|
| 111 | 117 | struct list_head list; |
|---|
| 112 | 118 | struct drm_connector *connector; |
|---|
| .. | .. |
|---|
| 184 | 190 | u16 target_bits_per_pixel_x16; |
|---|
| 185 | 191 | }; |
|---|
| 186 | 192 | |
|---|
| 193 | +#define ACM_GAIN_LUT_HY_LENGTH (9*17) |
|---|
| 194 | +#define ACM_GAIN_LUT_HY_TOTAL_LENGTH (ACM_GAIN_LUT_HY_LENGTH * 3) |
|---|
| 195 | +#define ACM_GAIN_LUT_HS_LENGTH (13*17) |
|---|
| 196 | +#define ACM_GAIN_LUT_HS_TOTAL_LENGTH (ACM_GAIN_LUT_HS_LENGTH * 3) |
|---|
| 197 | +#define ACM_DELTA_LUT_H_LENGTH 65 |
|---|
| 198 | +#define ACM_DELTA_LUT_H_TOTAL_LENGTH (ACM_DELTA_LUT_H_LENGTH * 3) |
|---|
| 199 | + |
|---|
| 200 | +struct post_acm { |
|---|
| 201 | + s16 delta_lut_h[ACM_DELTA_LUT_H_TOTAL_LENGTH]; |
|---|
| 202 | + s16 gain_lut_hy[ACM_GAIN_LUT_HY_TOTAL_LENGTH]; |
|---|
| 203 | + s16 gain_lut_hs[ACM_GAIN_LUT_HS_TOTAL_LENGTH]; |
|---|
| 204 | + u16 y_gain; |
|---|
| 205 | + u16 h_gain; |
|---|
| 206 | + u16 s_gain; |
|---|
| 207 | + u16 acm_enable; |
|---|
| 208 | +}; |
|---|
| 209 | + |
|---|
| 210 | +struct post_csc { |
|---|
| 211 | + u16 hue; |
|---|
| 212 | + u16 saturation; |
|---|
| 213 | + u16 contrast; |
|---|
| 214 | + u16 brightness; |
|---|
| 215 | + u16 r_gain; |
|---|
| 216 | + u16 g_gain; |
|---|
| 217 | + u16 b_gain; |
|---|
| 218 | + u16 r_offset; |
|---|
| 219 | + u16 g_offset; |
|---|
| 220 | + u16 b_offset; |
|---|
| 221 | + u16 csc_enable; |
|---|
| 222 | +}; |
|---|
| 223 | + |
|---|
| 187 | 224 | struct rockchip_crtc_state { |
|---|
| 188 | 225 | struct drm_crtc_state base; |
|---|
| 189 | 226 | int vp_id; |
|---|
| .. | .. |
|---|
| 227 | 264 | int afbdc_win_yoffset; |
|---|
| 228 | 265 | int dsp_layer_sel; |
|---|
| 229 | 266 | u32 output_if; |
|---|
| 267 | + u32 output_if_left_panel; |
|---|
| 230 | 268 | u32 bus_format; |
|---|
| 231 | 269 | u32 bus_flags; |
|---|
| 232 | 270 | int yuv_overlay; |
|---|
| .. | .. |
|---|
| 255 | 293 | struct drm_property_blob *hdr_ext_data; |
|---|
| 256 | 294 | struct drm_property_blob *acm_lut_data; |
|---|
| 257 | 295 | struct drm_property_blob *post_csc_data; |
|---|
| 296 | + struct drm_property_blob *cubic_lut_data; |
|---|
| 258 | 297 | |
|---|
| 259 | 298 | int request_refresh_rate; |
|---|
| 260 | 299 | int max_refresh_rate; |
|---|
| .. | .. |
|---|
| 399 | 438 | * @wait_vact_end: wait the last active line. |
|---|
| 400 | 439 | */ |
|---|
| 401 | 440 | struct rockchip_crtc_funcs { |
|---|
| 402 | | - int (*loader_protect)(struct drm_crtc *crtc, bool on); |
|---|
| 441 | + int (*loader_protect)(struct drm_crtc *crtc, bool on, void *data); |
|---|
| 403 | 442 | int (*enable_vblank)(struct drm_crtc *crtc); |
|---|
| 404 | 443 | void (*disable_vblank)(struct drm_crtc *crtc); |
|---|
| 405 | 444 | size_t (*bandwidth)(struct drm_crtc *crtc, |
|---|
| .. | .. |
|---|
| 452 | 491 | struct drm_property *aclk_prop; |
|---|
| 453 | 492 | struct drm_property *bg_prop; |
|---|
| 454 | 493 | struct drm_property *line_flag_prop; |
|---|
| 494 | + struct drm_property *cubic_lut_prop; |
|---|
| 495 | + struct drm_property *cubic_lut_size_prop; |
|---|
| 455 | 496 | |
|---|
| 456 | 497 | /* private plane prop */ |
|---|
| 457 | 498 | struct drm_property *eotf_prop; |
|---|
| .. | .. |
|---|
| 461 | 502 | |
|---|
| 462 | 503 | /* private connector prop */ |
|---|
| 463 | 504 | struct drm_property *connector_id_prop; |
|---|
| 505 | + struct drm_property *split_area_prop; |
|---|
| 464 | 506 | |
|---|
| 465 | 507 | const struct rockchip_crtc_funcs *crtc_funcs[ROCKCHIP_MAX_CRTC]; |
|---|
| 466 | 508 | |
|---|
| .. | .. |
|---|
| 525 | 567 | uint32_t rockchip_drm_of_find_possible_crtcs(struct drm_device *dev, |
|---|
| 526 | 568 | struct device_node *port); |
|---|
| 527 | 569 | uint32_t rockchip_drm_get_bpp(const struct drm_format_info *info); |
|---|
| 570 | +uint32_t rockchip_drm_get_cycles_per_pixel(uint32_t bus_format); |
|---|
| 528 | 571 | int rockchip_drm_get_yuv422_format(struct drm_connector *connector, |
|---|
| 529 | 572 | struct edid *edid); |
|---|
| 530 | 573 | int rockchip_drm_parse_cea_ext(struct rockchip_drm_dsc_cap *dsc_cap, |
|---|
| .. | .. |
|---|
| 533 | 576 | int rockchip_drm_parse_next_hdr(struct next_hdr_sink_data *sink_data, |
|---|
| 534 | 577 | const struct edid *edid); |
|---|
| 535 | 578 | int rockchip_drm_parse_colorimetry_data_block(u8 *colorimetry, const struct edid *edid); |
|---|
| 579 | +long rockchip_drm_dclk_round_rate(u32 version, struct clk *dclk, unsigned long rate); |
|---|
| 580 | +int rockchip_drm_dclk_set_rate(u32 version, struct clk *dclk, unsigned long rate); |
|---|
| 536 | 581 | |
|---|
| 537 | 582 | __printf(3, 4) |
|---|
| 538 | 583 | void rockchip_drm_dbg(const struct device *dev, enum rockchip_drm_debug_category category, |
|---|