Loading drivers/gpu/drm/msm/sde/sde_plane.c +23 −30 Original line number Diff line number Diff line Loading @@ -1721,22 +1721,19 @@ static inline void _sde_plane_set_scaler_v1(struct sde_plane *psde, void *usr) pe->vert_filter[i] = scale_v1.vert_filter[i]; } for (i = 0; i < SDE_MAX_PLANES; i++) { pe->num_ext_pxls_left[i] = scale_v1.lr.num_pxls_start[i]; pe->num_ext_pxls_right[i] = scale_v1.lr.num_pxls_end[i]; pe->left_ftch[i] = scale_v1.lr.ftch_start[i]; pe->right_ftch[i] = scale_v1.lr.ftch_end[i]; pe->left_rpt[i] = scale_v1.lr.rpt_start[i]; pe->right_rpt[i] = scale_v1.lr.rpt_end[i]; pe->roi_w[i] = scale_v1.lr.roi[i]; pe->num_ext_pxls_top[i] = scale_v1.tb.num_pxls_start[i]; pe->num_ext_pxls_btm[i] = scale_v1.tb.num_pxls_end[i]; pe->top_ftch[i] = scale_v1.tb.ftch_start[i]; pe->btm_ftch[i] = scale_v1.tb.ftch_end[i]; pe->top_rpt[i] = scale_v1.tb.rpt_start[i]; pe->btm_rpt[i] = scale_v1.tb.rpt_end[i]; pe->roi_h[i] = scale_v1.tb.roi[i]; pe->left_ftch[i] = scale_v1.pe.left_ftch[i]; pe->right_ftch[i] = scale_v1.pe.right_ftch[i]; pe->left_rpt[i] = scale_v1.pe.left_rpt[i]; pe->right_rpt[i] = scale_v1.pe.right_rpt[i]; pe->roi_w[i] = scale_v1.pe.num_ext_pxls_lr[i]; pe->top_ftch[i] = scale_v1.pe.top_ftch[i]; pe->btm_ftch[i] = scale_v1.pe.btm_ftch[i]; pe->top_rpt[i] = scale_v1.pe.top_rpt[i]; pe->btm_rpt[i] = scale_v1.pe.btm_rpt[i]; pe->roi_h[i] = scale_v1.pe.num_ext_pxls_tb[i]; } psde->pixel_ext_usr = true; SDE_DEBUG_PLANE(psde, "user property data copied\n"); Loading Loading @@ -1814,21 +1811,17 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde, cfg->de.adjust_c[i] = scale_v2.de.adjust_c[i]; } for (i = 0; i < SDE_MAX_PLANES; i++) { pe->num_ext_pxls_left[i] = scale_v2.lr.num_pxls_start[i]; pe->num_ext_pxls_right[i] = scale_v2.lr.num_pxls_end[i]; pe->left_ftch[i] = scale_v2.lr.ftch_start[i]; pe->right_ftch[i] = scale_v2.lr.ftch_end[i]; pe->left_rpt[i] = scale_v2.lr.rpt_start[i]; pe->right_rpt[i] = scale_v2.lr.rpt_end[i]; pe->roi_w[i] = scale_v2.lr.roi[i]; pe->num_ext_pxls_top[i] = scale_v2.tb.num_pxls_start[i]; pe->num_ext_pxls_btm[i] = scale_v2.tb.num_pxls_end[i]; pe->top_ftch[i] = scale_v2.tb.ftch_start[i]; pe->btm_ftch[i] = scale_v2.tb.ftch_end[i]; pe->top_rpt[i] = scale_v2.tb.rpt_start[i]; pe->btm_rpt[i] = scale_v2.tb.rpt_end[i]; pe->roi_h[i] = scale_v2.tb.roi[i]; pe->left_ftch[i] = scale_v2.pe.left_ftch[i]; pe->right_ftch[i] = scale_v2.pe.right_ftch[i]; pe->left_rpt[i] = scale_v2.pe.left_rpt[i]; pe->right_rpt[i] = scale_v2.pe.right_rpt[i]; pe->roi_w[i] = scale_v2.pe.num_ext_pxls_lr[i]; pe->top_ftch[i] = scale_v2.pe.top_ftch[i]; pe->btm_ftch[i] = scale_v2.pe.btm_ftch[i]; pe->top_rpt[i] = scale_v2.pe.top_rpt[i]; pe->btm_rpt[i] = scale_v2.pe.btm_rpt[i]; pe->roi_h[i] = scale_v2.pe.num_ext_pxls_tb[i]; } psde->pixel_ext_usr = true; Loading include/uapi/drm/sde_drm.h +73 −36 Original line number Diff line number Diff line Loading @@ -6,6 +6,30 @@ /* Total number of parameterized detail enhancer mapping curves */ #define SDE_MAX_DE_CURVES 3 /* Y/RGB and UV filter configuration */ #define FILTER_EDGE_DIRECTED_2D 0x0 #define FILTER_CIRCULAR_2D 0x1 #define FILTER_SEPARABLE_1D 0x2 #define FILTER_BILINEAR 0x3 /* Alpha filters */ #define FILTER_ALPHA_DROP_REPEAT 0x0 #define FILTER_ALPHA_BILINEAR 0x1 #define FILTER_ALPHA_2D 0x3 /* Blend filters */ #define FILTER_BLEND_CIRCULAR_2D 0x0 #define FILTER_BLEND_SEPARABLE_1D 0x1 /* LUT configuration flags */ #define SCALER_LUT_SWAP 0x1 #define SCALER_LUT_DIR_WR 0x2 #define SCALER_LUT_Y_CIR_WR 0x4 #define SCALER_LUT_UV_CIR_WR 0x8 #define SCALER_LUT_Y_SEP_WR 0x10 #define SCALER_LUT_UV_SEP_WR 0x20 /** * Blend operations for "blend_op" property * Loading Loading @@ -42,38 +66,42 @@ /** * struct sde_drm_pix_ext_v1 - version 1 of pixel ext structure * @num_pxls_start: Number of start pixels * @num_pxls_end: Number of end pixels * @ftch_start: Number of overfetch start pixels * @ftch_end: Number of overfetch end pixels * @rpt_start: Number of repeat start pixels * @rpt_end: Number of repeat end pixels * @roi: Input ROI settings * @num_ext_pxls_lr: Number of total horizontal pixels * @num_ext_pxls_tb: Number of total vertical lines * @left_ftch: Number of extra pixels to overfetch from left * @right_ftch: Number of extra pixels to overfetch from right * @top_ftch: Number of extra lines to overfetch from top * @btm_ftch: Number of extra lines to overfetch from bottom * @left_rpt: Number of extra pixels to repeat from left * @right_rpt: Number of extra pixels to repeat from right * @top_rpt: Number of extra lines to repeat from top * @btm_rpt: Number of extra lines to repeat from bottom */ struct sde_drm_pix_ext_v1 { /* * Number of pixels ext in left, right, top and bottom direction * for all color components. This pixel value for each color * component should be sum of fetch + repeat pixels. * for all color components. */ int32_t num_pxls_start[SDE_MAX_PLANES]; int32_t num_pxls_end[SDE_MAX_PLANES]; int32_t num_ext_pxls_lr[SDE_MAX_PLANES]; int32_t num_ext_pxls_tb[SDE_MAX_PLANES]; /* * Number of pixels needs to be overfetched in left, right, top * and bottom directions from source image for scaling. */ int32_t ftch_start[SDE_MAX_PLANES]; int32_t ftch_end[SDE_MAX_PLANES]; int32_t left_ftch[SDE_MAX_PLANES]; int32_t right_ftch[SDE_MAX_PLANES]; int32_t top_ftch[SDE_MAX_PLANES]; int32_t btm_ftch[SDE_MAX_PLANES]; /* * Number of pixels needs to be repeated in left, right, top and * bottom directions for scaling. */ int32_t rpt_start[SDE_MAX_PLANES]; int32_t rpt_end[SDE_MAX_PLANES]; int32_t left_rpt[SDE_MAX_PLANES]; int32_t right_rpt[SDE_MAX_PLANES]; int32_t top_rpt[SDE_MAX_PLANES]; int32_t btm_rpt[SDE_MAX_PLANES]; uint32_t roi[SDE_MAX_PLANES]; }; /** Loading @@ -91,9 +119,7 @@ struct sde_drm_scaler_v1 { /* * Pix ext settings */ struct sde_drm_pix_ext_v1 lr; struct sde_drm_pix_ext_v1 tb; struct sde_drm_pix_ext_v1 pe; /* * Phase settings */ Loading Loading @@ -144,17 +170,32 @@ struct sde_drm_de_v1 { /** * struct sde_drm_scaler_v2 - version 2 of struct sde_drm_scaler * @enable: Mask of SDE_DRM_SCALER_ bits * @lr: Pixel extension settings for left/right * @tb: Pixel extension settings for top/botton * @enable: Scaler enable * @dir_en: Detail enhancer enable * @pe: Pixel extension settings * @horz_decimate: Horizontal decimation factor * @vert_decimate: Vertical decimation factor * @init_phase_x: Initial scaler phase values for x * @phase_step_x: Phase step values for x * @init_phase_y: Initial scaler phase values for y * @phase_step_y: Phase step values for y * @horz_filter: Horizontal filter array * @vert_filter: Vertical filter array * @preload_x: Horizontal preload value * @preload_y: Vertical preload value * @src_width: Source width * @src_height: Source height * @dst_width: Destination width * @dst_height: Destination height * @y_rgb_filter_cfg: Y/RGB plane filter configuration * @uv_filter_cfg: UV plane filter configuration * @alpha_filter_cfg: Alpha filter configuration * @blend_cfg: Selection of blend coefficients * @lut_flag: LUT configuration flags * @dir_lut_idx: 2d 4x4 LUT index * @y_rgb_cir_lut_idx: Y/RGB circular LUT index * @uv_cir_lut_idx: UV circular LUT index * @y_rgb_sep_lut_idx: Y/RGB separable LUT index * @uv_sep_lut_idx: UV separable LUT index * @de: Detail enhancer settings */ struct sde_drm_scaler_v2 { /* Loading @@ -166,8 +207,7 @@ struct sde_drm_scaler_v2 { /* * Pix ext settings */ struct sde_drm_pix_ext_v1 lr; struct sde_drm_pix_ext_v1 tb; struct sde_drm_pix_ext_v1 pe; /* * Decimation settings Loading @@ -183,9 +223,6 @@ struct sde_drm_scaler_v2 { int32_t init_phase_y[SDE_MAX_PLANES]; int32_t phase_step_y[SDE_MAX_PLANES]; /* alpha plane can only be scaled using bilinear or pixel * repeat/drop, specify these for Y and UV planes only */ uint32_t preload_x[SDE_MAX_PLANES]; uint32_t preload_y[SDE_MAX_PLANES]; uint32_t src_width[SDE_MAX_PLANES]; Loading Loading
drivers/gpu/drm/msm/sde/sde_plane.c +23 −30 Original line number Diff line number Diff line Loading @@ -1721,22 +1721,19 @@ static inline void _sde_plane_set_scaler_v1(struct sde_plane *psde, void *usr) pe->vert_filter[i] = scale_v1.vert_filter[i]; } for (i = 0; i < SDE_MAX_PLANES; i++) { pe->num_ext_pxls_left[i] = scale_v1.lr.num_pxls_start[i]; pe->num_ext_pxls_right[i] = scale_v1.lr.num_pxls_end[i]; pe->left_ftch[i] = scale_v1.lr.ftch_start[i]; pe->right_ftch[i] = scale_v1.lr.ftch_end[i]; pe->left_rpt[i] = scale_v1.lr.rpt_start[i]; pe->right_rpt[i] = scale_v1.lr.rpt_end[i]; pe->roi_w[i] = scale_v1.lr.roi[i]; pe->num_ext_pxls_top[i] = scale_v1.tb.num_pxls_start[i]; pe->num_ext_pxls_btm[i] = scale_v1.tb.num_pxls_end[i]; pe->top_ftch[i] = scale_v1.tb.ftch_start[i]; pe->btm_ftch[i] = scale_v1.tb.ftch_end[i]; pe->top_rpt[i] = scale_v1.tb.rpt_start[i]; pe->btm_rpt[i] = scale_v1.tb.rpt_end[i]; pe->roi_h[i] = scale_v1.tb.roi[i]; pe->left_ftch[i] = scale_v1.pe.left_ftch[i]; pe->right_ftch[i] = scale_v1.pe.right_ftch[i]; pe->left_rpt[i] = scale_v1.pe.left_rpt[i]; pe->right_rpt[i] = scale_v1.pe.right_rpt[i]; pe->roi_w[i] = scale_v1.pe.num_ext_pxls_lr[i]; pe->top_ftch[i] = scale_v1.pe.top_ftch[i]; pe->btm_ftch[i] = scale_v1.pe.btm_ftch[i]; pe->top_rpt[i] = scale_v1.pe.top_rpt[i]; pe->btm_rpt[i] = scale_v1.pe.btm_rpt[i]; pe->roi_h[i] = scale_v1.pe.num_ext_pxls_tb[i]; } psde->pixel_ext_usr = true; SDE_DEBUG_PLANE(psde, "user property data copied\n"); Loading Loading @@ -1814,21 +1811,17 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde, cfg->de.adjust_c[i] = scale_v2.de.adjust_c[i]; } for (i = 0; i < SDE_MAX_PLANES; i++) { pe->num_ext_pxls_left[i] = scale_v2.lr.num_pxls_start[i]; pe->num_ext_pxls_right[i] = scale_v2.lr.num_pxls_end[i]; pe->left_ftch[i] = scale_v2.lr.ftch_start[i]; pe->right_ftch[i] = scale_v2.lr.ftch_end[i]; pe->left_rpt[i] = scale_v2.lr.rpt_start[i]; pe->right_rpt[i] = scale_v2.lr.rpt_end[i]; pe->roi_w[i] = scale_v2.lr.roi[i]; pe->num_ext_pxls_top[i] = scale_v2.tb.num_pxls_start[i]; pe->num_ext_pxls_btm[i] = scale_v2.tb.num_pxls_end[i]; pe->top_ftch[i] = scale_v2.tb.ftch_start[i]; pe->btm_ftch[i] = scale_v2.tb.ftch_end[i]; pe->top_rpt[i] = scale_v2.tb.rpt_start[i]; pe->btm_rpt[i] = scale_v2.tb.rpt_end[i]; pe->roi_h[i] = scale_v2.tb.roi[i]; pe->left_ftch[i] = scale_v2.pe.left_ftch[i]; pe->right_ftch[i] = scale_v2.pe.right_ftch[i]; pe->left_rpt[i] = scale_v2.pe.left_rpt[i]; pe->right_rpt[i] = scale_v2.pe.right_rpt[i]; pe->roi_w[i] = scale_v2.pe.num_ext_pxls_lr[i]; pe->top_ftch[i] = scale_v2.pe.top_ftch[i]; pe->btm_ftch[i] = scale_v2.pe.btm_ftch[i]; pe->top_rpt[i] = scale_v2.pe.top_rpt[i]; pe->btm_rpt[i] = scale_v2.pe.btm_rpt[i]; pe->roi_h[i] = scale_v2.pe.num_ext_pxls_tb[i]; } psde->pixel_ext_usr = true; Loading
include/uapi/drm/sde_drm.h +73 −36 Original line number Diff line number Diff line Loading @@ -6,6 +6,30 @@ /* Total number of parameterized detail enhancer mapping curves */ #define SDE_MAX_DE_CURVES 3 /* Y/RGB and UV filter configuration */ #define FILTER_EDGE_DIRECTED_2D 0x0 #define FILTER_CIRCULAR_2D 0x1 #define FILTER_SEPARABLE_1D 0x2 #define FILTER_BILINEAR 0x3 /* Alpha filters */ #define FILTER_ALPHA_DROP_REPEAT 0x0 #define FILTER_ALPHA_BILINEAR 0x1 #define FILTER_ALPHA_2D 0x3 /* Blend filters */ #define FILTER_BLEND_CIRCULAR_2D 0x0 #define FILTER_BLEND_SEPARABLE_1D 0x1 /* LUT configuration flags */ #define SCALER_LUT_SWAP 0x1 #define SCALER_LUT_DIR_WR 0x2 #define SCALER_LUT_Y_CIR_WR 0x4 #define SCALER_LUT_UV_CIR_WR 0x8 #define SCALER_LUT_Y_SEP_WR 0x10 #define SCALER_LUT_UV_SEP_WR 0x20 /** * Blend operations for "blend_op" property * Loading Loading @@ -42,38 +66,42 @@ /** * struct sde_drm_pix_ext_v1 - version 1 of pixel ext structure * @num_pxls_start: Number of start pixels * @num_pxls_end: Number of end pixels * @ftch_start: Number of overfetch start pixels * @ftch_end: Number of overfetch end pixels * @rpt_start: Number of repeat start pixels * @rpt_end: Number of repeat end pixels * @roi: Input ROI settings * @num_ext_pxls_lr: Number of total horizontal pixels * @num_ext_pxls_tb: Number of total vertical lines * @left_ftch: Number of extra pixels to overfetch from left * @right_ftch: Number of extra pixels to overfetch from right * @top_ftch: Number of extra lines to overfetch from top * @btm_ftch: Number of extra lines to overfetch from bottom * @left_rpt: Number of extra pixels to repeat from left * @right_rpt: Number of extra pixels to repeat from right * @top_rpt: Number of extra lines to repeat from top * @btm_rpt: Number of extra lines to repeat from bottom */ struct sde_drm_pix_ext_v1 { /* * Number of pixels ext in left, right, top and bottom direction * for all color components. This pixel value for each color * component should be sum of fetch + repeat pixels. * for all color components. */ int32_t num_pxls_start[SDE_MAX_PLANES]; int32_t num_pxls_end[SDE_MAX_PLANES]; int32_t num_ext_pxls_lr[SDE_MAX_PLANES]; int32_t num_ext_pxls_tb[SDE_MAX_PLANES]; /* * Number of pixels needs to be overfetched in left, right, top * and bottom directions from source image for scaling. */ int32_t ftch_start[SDE_MAX_PLANES]; int32_t ftch_end[SDE_MAX_PLANES]; int32_t left_ftch[SDE_MAX_PLANES]; int32_t right_ftch[SDE_MAX_PLANES]; int32_t top_ftch[SDE_MAX_PLANES]; int32_t btm_ftch[SDE_MAX_PLANES]; /* * Number of pixels needs to be repeated in left, right, top and * bottom directions for scaling. */ int32_t rpt_start[SDE_MAX_PLANES]; int32_t rpt_end[SDE_MAX_PLANES]; int32_t left_rpt[SDE_MAX_PLANES]; int32_t right_rpt[SDE_MAX_PLANES]; int32_t top_rpt[SDE_MAX_PLANES]; int32_t btm_rpt[SDE_MAX_PLANES]; uint32_t roi[SDE_MAX_PLANES]; }; /** Loading @@ -91,9 +119,7 @@ struct sde_drm_scaler_v1 { /* * Pix ext settings */ struct sde_drm_pix_ext_v1 lr; struct sde_drm_pix_ext_v1 tb; struct sde_drm_pix_ext_v1 pe; /* * Phase settings */ Loading Loading @@ -144,17 +170,32 @@ struct sde_drm_de_v1 { /** * struct sde_drm_scaler_v2 - version 2 of struct sde_drm_scaler * @enable: Mask of SDE_DRM_SCALER_ bits * @lr: Pixel extension settings for left/right * @tb: Pixel extension settings for top/botton * @enable: Scaler enable * @dir_en: Detail enhancer enable * @pe: Pixel extension settings * @horz_decimate: Horizontal decimation factor * @vert_decimate: Vertical decimation factor * @init_phase_x: Initial scaler phase values for x * @phase_step_x: Phase step values for x * @init_phase_y: Initial scaler phase values for y * @phase_step_y: Phase step values for y * @horz_filter: Horizontal filter array * @vert_filter: Vertical filter array * @preload_x: Horizontal preload value * @preload_y: Vertical preload value * @src_width: Source width * @src_height: Source height * @dst_width: Destination width * @dst_height: Destination height * @y_rgb_filter_cfg: Y/RGB plane filter configuration * @uv_filter_cfg: UV plane filter configuration * @alpha_filter_cfg: Alpha filter configuration * @blend_cfg: Selection of blend coefficients * @lut_flag: LUT configuration flags * @dir_lut_idx: 2d 4x4 LUT index * @y_rgb_cir_lut_idx: Y/RGB circular LUT index * @uv_cir_lut_idx: UV circular LUT index * @y_rgb_sep_lut_idx: Y/RGB separable LUT index * @uv_sep_lut_idx: UV separable LUT index * @de: Detail enhancer settings */ struct sde_drm_scaler_v2 { /* Loading @@ -166,8 +207,7 @@ struct sde_drm_scaler_v2 { /* * Pix ext settings */ struct sde_drm_pix_ext_v1 lr; struct sde_drm_pix_ext_v1 tb; struct sde_drm_pix_ext_v1 pe; /* * Decimation settings Loading @@ -183,9 +223,6 @@ struct sde_drm_scaler_v2 { int32_t init_phase_y[SDE_MAX_PLANES]; int32_t phase_step_y[SDE_MAX_PLANES]; /* alpha plane can only be scaled using bilinear or pixel * repeat/drop, specify these for Y and UV planes only */ uint32_t preload_x[SDE_MAX_PLANES]; uint32_t preload_y[SDE_MAX_PLANES]; uint32_t src_width[SDE_MAX_PLANES]; Loading