summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
diff options
context:
space:
mode:
authorjames qian wang (Arm Technology China) <james.qian.wang@arm.com>2019-06-10 11:16:02 +0100
committerLiviu Dudau <Liviu.Dudau@arm.com>2019-06-19 11:42:17 +0100
commitb35d0927d3b02ccef061113268c202b7b9fac695 (patch)
tree41999bf56fa3d6f56d27508d8ebd611f688eff2d /drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
parent9a28105f5a439d3dc5e595042b3f97b1bb4cd4f1 (diff)
downloadlwn-b35d0927d3b02ccef061113268c202b7b9fac695.tar.gz
lwn-b35d0927d3b02ccef061113268c202b7b9fac695.zip
drm/komeda: Add split support for scaler
To achieve same caling effect compare with none split, the texel calculation need to use the same scaling ratio before split, so add "total_xxx" to pipeline to describe the hsize/vsize before split. Update pipeline and d71_scaler_update accordingly. v2: Rebase and addressed Liviu's comments Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c')
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
index 7fb7f725a6de..714961a0f91e 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
@@ -507,11 +507,18 @@ komeda_scaler_validate(void *user,
st->vsize_in = dflow->in_h;
st->hsize_out = dflow->out_w;
st->vsize_out = dflow->out_h;
+ st->right_crop = dflow->right_crop;
+ st->left_crop = dflow->left_crop;
+ st->total_vsize_in = dflow->total_in_h;
+ st->total_hsize_in = dflow->total_in_w;
+ st->total_hsize_out = dflow->total_out_w;
/* Enable alpha processing if the next stage needs the pixel alpha */
st->en_alpha = dflow->pixel_blend_mode != DRM_MODE_BLEND_PIXEL_NONE;
st->en_scaling = dflow->en_scaling;
st->en_img_enhancement = dflow->en_img_enhancement;
+ st->en_split = dflow->en_split;
+ st->right_part = dflow->right_part;
komeda_component_add_input(&st->base, &dflow->input, 0);
komeda_component_set_output(&dflow->input, &scaler->base, 0);
@@ -665,11 +672,20 @@ komeda_timing_ctrlr_validate(struct komeda_timing_ctrlr *ctrlr,
return 0;
}
-void komeda_complete_data_flow_cfg(struct komeda_data_flow_cfg *dflow)
+void komeda_complete_data_flow_cfg(struct komeda_data_flow_cfg *dflow,
+ struct drm_framebuffer *fb)
{
u32 w = dflow->in_w;
u32 h = dflow->in_h;
+ dflow->total_in_w = dflow->in_w;
+ dflow->total_in_h = dflow->in_h;
+ dflow->total_out_w = dflow->out_w;
+
+ /* if format doesn't have alpha, fix blend mode to PIXEL_NONE */
+ if (!fb->format->has_alpha)
+ dflow->pixel_blend_mode = DRM_MODE_BLEND_PIXEL_NONE;
+
if (drm_rotation_90_or_270(dflow->rot))
swap(w, h);