From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org,
gustavo.padovan@collabora.co.uk, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/exynos: mixer: do blending setup in mixer_cfg_layer()
Date: Fri, 22 May 2015 11:50:44 +0200 [thread overview]
Message-ID: <75f1ddb7be890d0adace39976c0e2a45@math.uni-bielefeld.de> (raw)
In-Reply-To: <555EF305.3030001@samsung.com>
Hello Joonyoung,
On 2015-05-22 11:12, Joonyoung Shim wrote:
> On 05/06/2015 10:36 PM, Tobias Jakobi wrote:
>> This updates the blending setup when the layer configuration
>> changes (triggered by mixer_win_{commit,disable}).
>>
>> Extra care has to be taken for the layer that is currently
>> being enabled/disabled.
>>
>> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>> ---
>> drivers/gpu/drm/exynos/exynos_mixer.c | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
>> b/drivers/gpu/drm/exynos/exynos_mixer.c
>> index 3ab7a01..430d10c 100644
>> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
>> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
>> @@ -177,6 +177,18 @@ static inline bool is_alpha_format(const struct
>> mixer_context* ctx, unsigned int
>> }
>> }
>>
>> +static inline unsigned int layer_bitmask(const struct mixer_context*
>> ctx)
>> +{
>> + unsigned int i, mask = 0;
>> +
>> + for (i = 0; i < MIXER_WIN_NR; ++i) {
>> + if (ctx->planes[i].enabled)
>> + mask |= (1 << i);
>> + }
>> +
>> + return mask;
>> +}
>> +
>> static inline u32 vp_reg_read(struct mixer_resources *res, u32
>> reg_id)
>> {
>> return readl(res->vp_regs + reg_id);
>> @@ -513,6 +525,7 @@ static void mixer_cfg_rgb_fmt(struct mixer_context
>> *ctx, unsigned int height)
>> static void mixer_cfg_layer(struct mixer_context *ctx, unsigned int
>> win, bool enable)
>> {
>> struct mixer_resources *res = &ctx->mixer_res;
>> + unsigned int enable_state;
>> u32 val = enable ? ~0 : 0;
>>
>> switch (win) {
>> @@ -530,6 +543,16 @@ static void mixer_cfg_layer(struct mixer_context
>> *ctx, unsigned int win, bool en
>> }
>> break;
>> }
>> +
>> + /* Determine the current enabled/disabled state of the layers. */
>> + enable_state = layer_bitmask(ctx);
>> + if (enable)
>> + enable_state |= (1 << win);
>> + else
>> + enable_state &= ~(1 << win);
>
> I think way to remove to get enable_state of plane everytime, maybe
> using atomic state information?
I had the same idea, but I don't know even about the atomic
infrastructure to evaluate if this is possible. I guess Gustavo would be
the one who could answer this.
>
>> +
>> + /* Layer configuration has changed, update blending setup. */
>> + mixer_layer_blending(ctx, enable_state);
>> }
>>
>> static void mixer_run(struct mixer_context *ctx)
>>
With best wishes,
Tobias
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-05-22 9:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 13:36 [PATCH 0/5] drm/exynos: rework layer blending setup Tobias Jakobi
2015-05-06 13:36 ` [PATCH 1/5] drm/exynos: mixer: refactor layer setup Tobias Jakobi
2015-05-22 9:12 ` Joonyoung Shim
2015-05-22 9:47 ` Tobias Jakobi
2015-05-22 16:01 ` Tobias Jakobi
2015-05-06 13:36 ` [PATCH 2/5] drm/exynos: mixer: introduce mixer_layer_blending() Tobias Jakobi
2015-05-22 9:12 ` Joonyoung Shim
2015-05-22 9:49 ` Tobias Jakobi
2015-05-06 13:36 ` [PATCH 3/5] drm/exynos: mixer: remove all static blending setup Tobias Jakobi
2015-05-06 13:36 ` [PATCH 4/5] drm/exynos: mixer: do blending setup in mixer_cfg_layer() Tobias Jakobi
2015-05-22 9:12 ` Joonyoung Shim
2015-05-22 9:50 ` Tobias Jakobi [this message]
2015-05-06 13:36 ` [PATCH 5/5] drm/exynos: mixer: also allow ARGB1555 and ARGB4444 Tobias Jakobi
2015-05-07 20:57 ` [PATCH 0/5] drm/exynos: rework layer blending setup Gustavo Padovan
2015-05-21 20:44 ` Tobias Jakobi
2015-05-22 4:04 ` Joonyoung Shim
2015-05-22 8:07 ` Tobias Jakobi
2015-05-22 9:13 ` Joonyoung Shim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75f1ddb7be890d0adace39976c0e2a45@math.uni-bielefeld.de \
--to=tjakobi@math.uni-bielefeld.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=jy0922.shim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox