diff options
| author | Dhaval Patel <pdhaval@codeaurora.org> | 2016-08-31 16:39:36 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-31 16:39:36 -0700 |
| commit | aa38013acb1e3f4af88db27c24cf6eef4ffc6580 (patch) | |
| tree | d04b4b55347dc2a06709f61bfcc3e2019b90cbf6 /drivers/gpu | |
| parent | abb85b87044166cd71cd743bee2029b119e70d9b (diff) | |
| parent | b6440bd2913f164a95344f14c9de01d8c2ea23e3 (diff) | |
Merge "drm/sde: allow base layer plane stagging" into dev/msm-4.4-drm_kms
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_hw_lm.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_hw_lm.c b/drivers/gpu/drm/msm/sde/sde_hw_lm.c index 01cf2dd99f12..1c51a1da0a38 100644 --- a/drivers/gpu/drm/msm/sde/sde_hw_lm.c +++ b/drivers/gpu/drm/msm/sde/sde_hw_lm.c @@ -54,14 +54,16 @@ static struct sde_lm_cfg *_lm_offset(enum sde_lm mixer, static inline int _stage_offset(struct sde_hw_mixer *ctx, enum sde_stage stage) { const struct sde_lm_sub_blks *sblk = ctx->cap->sblk; + int rc; - if (WARN_ON(stage == SDE_STAGE_BASE)) - return -EINVAL; - - if ((stage - SDE_STAGE_0) <= sblk->maxblendstages) - return sblk->blendstage_base[stage - 1]; + if (stage == SDE_STAGE_BASE) + rc = -EINVAL; + else if (stage <= sblk->maxblendstages) + rc = sblk->blendstage_base[stage - 1]; else - return -EINVAL; + rc = -EINVAL; + + return rc; } static void sde_hw_lm_setup_out(struct sde_hw_mixer *ctx, @@ -106,6 +108,9 @@ static void sde_hw_lm_setup_blendcfg(struct sde_hw_mixer *ctx, struct sde_hw_alpha_cfg *fg, *bg; int stage_off; + if (stage == SDE_STAGE_BASE) + return; + stage_off = _stage_offset(ctx, stage); if (WARN_ON(stage_off < 0)) return; |
