/*
- * Copyright (C) 2010-2015 Freescale Semiconductor, Inc.
+ * Copyright (C) 2010-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
*
* 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
*/
static int pxp_config(struct pxps *pxp, struct pxp_channel *pxp_chan)
{
- struct pxp_config_data *pxp_conf_data = &pxp->pxp_conf_state;
- int ol_nr;
- int i;
-
/* Configure PxP regs */
pxp_set_ctrl(pxp);
pxp_set_s0param(pxp);
pxp_set_s0crop(pxp);
pxp_set_scaling(pxp);
- ol_nr = pxp_conf_data->layer_nr - 2;
- while (ol_nr > 0) {
- i = pxp_conf_data->layer_nr - 2 - ol_nr;
- pxp_set_oln(i, pxp);
- pxp_set_olparam(i, pxp);
- /* only the color key in higher overlay will take effect. */
- pxp_set_olcolorkey(i, pxp);
- ol_nr--;
- }
pxp_set_s0colorkey(pxp);
+
+ pxp_set_oln(0, pxp);
+ pxp_set_olparam(0, pxp);
+ pxp_set_olcolorkey(0, pxp);
+
pxp_set_csc(pxp);
pxp_set_bg(pxp);
pxp_set_lut(pxp);
{
struct pxp_config_data *pxp_conf_data = &pxp->pxp_conf_state;
struct pxp_proc_data *proc_data = &pxp_conf_data->proc_data;
- int ol_nr;
- int i;
if ((proc_data->working_mode & PXP_MODE_STANDARD) == PXP_MODE_STANDARD) {
-
/* now only test dithering feature */
if ((proc_data->engine_enable & PXP_ENABLE_DITHER) == PXP_ENABLE_DITHER) {
pxp_dithering_process(pxp);
pxp->base + HW_PXP_CTRL_SET);
return 0;
}
-}
+ }
if ((proc_data->engine_enable & PXP_ENABLE_WFE_A) == PXP_ENABLE_WFE_A)
{
pxp_set_s0param(pxp);
pxp_set_s0crop(pxp);
pxp_set_scaling(pxp);
- ol_nr = pxp_conf_data->layer_nr - 2;
+ pxp_set_s0colorkey(pxp);
- if (ol_nr == 0) {
+ if (pxp_conf_data->layer_nr == 2) {
/* disable AS engine */
__raw_writel(BF_PXP_OUT_AS_ULC_X(1) |
BF_PXP_OUT_AS_ULC_Y(1),
pxp->base + HW_PXP_OUT_AS_ULC);
-
__raw_writel(BF_PXP_OUT_AS_LRC_X(0) |
BF_PXP_OUT_AS_LRC_Y(0),
pxp->base + HW_PXP_OUT_AS_LRC);
- } else {
- while (ol_nr > 0) {
- i = pxp_conf_data->layer_nr - 2 - ol_nr;
- pxp_set_oln(i, pxp);
- pxp_set_olparam(i, pxp);
- /* only the color key in higher overlay will take effect. */
- pxp_set_olcolorkey(i, pxp);
- ol_nr--;
- }
- }
- pxp_set_s0colorkey(pxp);
+ } else
+ pxp_set_oln(0, pxp);
+ pxp_set_olparam(0, pxp);
+ pxp_set_olcolorkey(0, pxp);
+
pxp_set_csc(pxp);
pxp_set_bg(pxp);
pxp_set_lut(pxp);
memset(&pxp->pxp_conf_state.s0_param, 0, sizeof(struct pxp_layer_param));
memset(&pxp->pxp_conf_state.out_param, 0, sizeof(struct pxp_layer_param));
- memset(pxp->pxp_conf_state.ol_param, 0, sizeof(struct pxp_layer_param) * 8);
+ memset(pxp->pxp_conf_state.ol_param, 0, sizeof(struct pxp_layer_param));
memset(&pxp->pxp_conf_state.proc_data, 0, sizeof(struct pxp_proc_data));
/* S0 */
desc = list_first_entry(&head, struct pxp_tx_desc, list);
/*
* Copyright (C) 2010-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
*
* 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
* Initialize OL0 channel parameters
* No overlay will be used for PxP operation
*/
- for (i = 0; i < 8; i++) {
- pxp_conf->ol_param[i].combine_enable = false;
- pxp_conf->ol_param[i].width = 0;
- pxp_conf->ol_param[i].height = 0;
- pxp_conf->ol_param[i].pixel_fmt = PXP_PIX_FMT_RGB565;
- pxp_conf->ol_param[i].color_key_enable = false;
- pxp_conf->ol_param[i].color_key = -1;
- pxp_conf->ol_param[i].global_alpha_enable = false;
- pxp_conf->ol_param[i].global_alpha = 0;
- pxp_conf->ol_param[i].local_alpha_enable = false;
- }
+ pxp_conf->ol_param[0].combine_enable = false;
+ pxp_conf->ol_param[0].width = 0;
+ pxp_conf->ol_param[0].height = 0;
+ pxp_conf->ol_param[0].pixel_fmt = PXP_PIX_FMT_RGB565;
+ pxp_conf->ol_param[0].color_key_enable = false;
+ pxp_conf->ol_param[0].color_key = -1;
+ pxp_conf->ol_param[0].global_alpha_enable = false;
+ pxp_conf->ol_param[0].global_alpha = 0;
+ pxp_conf->ol_param[0].local_alpha_enable = false;
/*
* Initialize Output channel parameters
/*
* Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
*
* 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
* Initialize OL0 channel parameters
* No overlay will be used for PxP operation
*/
- for (i = 0; i < 8; i++) {
- pxp_conf->ol_param[i].combine_enable = false;
- pxp_conf->ol_param[i].width = 0;
- pxp_conf->ol_param[i].height = 0;
- pxp_conf->ol_param[i].pixel_fmt = PXP_PIX_FMT_RGB565;
- pxp_conf->ol_param[i].color_key_enable = false;
- pxp_conf->ol_param[i].color_key = -1;
- pxp_conf->ol_param[i].global_alpha_enable = false;
- pxp_conf->ol_param[i].global_alpha = 0;
- pxp_conf->ol_param[i].local_alpha_enable = false;
- }
+ pxp_conf->ol_param[0].combine_enable = false;
+ pxp_conf->ol_param[0].width = 0;
+ pxp_conf->ol_param[0].height = 0;
+ pxp_conf->ol_param[0].pixel_fmt = PXP_PIX_FMT_RGB565;
+ pxp_conf->ol_param[0].color_key_enable = false;
+ pxp_conf->ol_param[0].color_key = -1;
+ pxp_conf->ol_param[0].global_alpha_enable = false;
+ pxp_conf->ol_param[0].global_alpha = 0;
+ pxp_conf->ol_param[0].local_alpha_enable = false;
/*
* Initialize Output channel parameters
struct pxp_config_data {
struct pxp_layer_param s0_param;
- struct pxp_layer_param ol_param[8];
+ struct pxp_layer_param ol_param[1];
struct pxp_layer_param out_param;
struct pxp_layer_param wfe_a_fetch_param[2];
struct pxp_layer_param wfe_a_store_param[2];