All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Yannick FERTRE <yannick.fertre@st.com>
Cc: Philippe CORNU <philippe.cornu@st.com>,
	Vincent ABRIOU <vincent.abriou@st.com>,
	David Airlie <airlied@linux.ie>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Fabien DESSENNE <fabien.dessenne@st.com>,
	Mickael REULIER <mickael.reulier@st.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>
Subject: Re: [PATCH v1 2/2] drm/stm: ltdc: remove non-alpha color formats on layer 2 for older hw
Date: Thu, 8 Feb 2018 10:40:52 +0100	[thread overview]
Message-ID: <CA+M3ks7TWeHg1YK6+wR46XSxv0R6ftvLdAkeXBV6mvfA40kRgA@mail.gmail.com> (raw)
In-Reply-To: <e36e7e5f-e5c8-8214-0a01-f4f2ee06cf69@st.com>

2018-02-06 10:13 GMT+01:00 Yannick FERTRE <yannick.fertre@st.com>:
> Reviewed-by: Yannick Fertré <yannick.fertre@st.com>
>
>
> On 02/01/2018 11:42 AM, Philippe Cornu wrote:
>> Hw older versions support non-alpha color formats derived
>> from native alpha color formats only on the primary layer.
>> For instance, RG16 native format without alpha works fine
>> on 2nd layer but XR24 (derived color format from AR24)
>> does not work on 2nd layer.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>

Applied on drm-misc-next

Benjamin

>> ---
>>   drivers/gpu/drm/stm/ltdc.c | 20 ++++++++++++++++++++
>>   drivers/gpu/drm/stm/ltdc.h |  1 +
>>   2 files changed, 21 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index f6f26fc0ae9e..1a3277e483d5 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -703,6 +703,11 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,
>>       if (!fb->format->has_alpha)
>>               val = BF1_CA | BF2_1CA;
>>
>> +     /* Manage hw-specific capabilities */
>> +     if (ldev->caps.non_alpha_only_l1 &&
>> +         plane->type != DRM_PLANE_TYPE_PRIMARY)
>> +             val = BF1_PAXCA | BF2_1PAXCA;
>> +
>>       reg_update_bits(ldev->regs, LTDC_L1BFCR + lofs,
>>                       LXBFCR_BF2 | LXBFCR_BF1, val);
>>
>> @@ -785,6 +790,12 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
>>               drm_fmt_no_alpha = get_pixelformat_without_alpha(drm_fmt);
>>               if (!drm_fmt_no_alpha)
>>                       continue;
>> +
>> +             /* Manage hw-specific capabilities */
>> +             if (ldev->caps.non_alpha_only_l1 &&
>> +                 type != DRM_PLANE_TYPE_PRIMARY)
>> +                     continue;
>> +
>>               formats[nb_fmt++] = drm_fmt_no_alpha;
>>       }
>>
>> @@ -913,10 +924,19 @@ static int ltdc_get_caps(struct drm_device *ddev)
>>       case HWVER_10300:
>>               ldev->caps.reg_ofs = REG_OFS_NONE;
>>               ldev->caps.pix_fmt_hw = ltdc_pix_fmt_a0;
>> +             /*
>> +              * Hw older versions support non-alpha color formats derived
>> +              * from native alpha color formats only on the primary layer.
>> +              * For instance, RG16 native format without alpha works fine
>> +              * on 2nd layer but XR24 (derived color format from AR24)
>> +              * does not work on 2nd layer.
>> +              */
>> +             ldev->caps.non_alpha_only_l1 = true;
>>               break;
>>       case HWVER_20101:
>>               ldev->caps.reg_ofs = REG_OFS_4;
>>               ldev->caps.pix_fmt_hw = ltdc_pix_fmt_a1;
>> +             ldev->caps.non_alpha_only_l1 = false;
>>               break;
>>       default:
>>               return -ENODEV;
>> diff --git a/drivers/gpu/drm/stm/ltdc.h b/drivers/gpu/drm/stm/ltdc.h
>> index edd1c0a446d1..edb268129c54 100644
>> --- a/drivers/gpu/drm/stm/ltdc.h
>> +++ b/drivers/gpu/drm/stm/ltdc.h
>> @@ -17,6 +17,7 @@ struct ltdc_caps {
>>       u32 reg_ofs;            /* register offset for applicable regs */
>>       u32 bus_width;          /* bus width (32 or 64 bits) */
>>       const u32 *pix_fmt_hw;  /* supported pixel formats */
>> +     bool non_alpha_only_l1; /* non-native no-alpha formats on layer 1 */
>>   };
>>
>>   struct ltdc_device {

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Yannick FERTRE <yannick.fertre@st.com>
Cc: Alexandre TORGUE <alexandre.torgue@st.com>,
	David Airlie <airlied@linux.ie>,
	Philippe CORNU <philippe.cornu@st.com>,
	Fabien DESSENNE <fabien.dessenne@st.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Mickael REULIER <mickael.reulier@st.com>,
	Vincent ABRIOU <vincent.abriou@st.com>
Subject: Re: [PATCH v1 2/2] drm/stm: ltdc: remove non-alpha color formats on layer 2 for older hw
Date: Thu, 8 Feb 2018 10:40:52 +0100	[thread overview]
Message-ID: <CA+M3ks7TWeHg1YK6+wR46XSxv0R6ftvLdAkeXBV6mvfA40kRgA@mail.gmail.com> (raw)
In-Reply-To: <e36e7e5f-e5c8-8214-0a01-f4f2ee06cf69@st.com>

2018-02-06 10:13 GMT+01:00 Yannick FERTRE <yannick.fertre@st.com>:
> Reviewed-by: Yannick Fertré <yannick.fertre@st.com>
>
>
> On 02/01/2018 11:42 AM, Philippe Cornu wrote:
>> Hw older versions support non-alpha color formats derived
>> from native alpha color formats only on the primary layer.
>> For instance, RG16 native format without alpha works fine
>> on 2nd layer but XR24 (derived color format from AR24)
>> does not work on 2nd layer.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>

Applied on drm-misc-next

Benjamin

>> ---
>>   drivers/gpu/drm/stm/ltdc.c | 20 ++++++++++++++++++++
>>   drivers/gpu/drm/stm/ltdc.h |  1 +
>>   2 files changed, 21 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index f6f26fc0ae9e..1a3277e483d5 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -703,6 +703,11 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,
>>       if (!fb->format->has_alpha)
>>               val = BF1_CA | BF2_1CA;
>>
>> +     /* Manage hw-specific capabilities */
>> +     if (ldev->caps.non_alpha_only_l1 &&
>> +         plane->type != DRM_PLANE_TYPE_PRIMARY)
>> +             val = BF1_PAXCA | BF2_1PAXCA;
>> +
>>       reg_update_bits(ldev->regs, LTDC_L1BFCR + lofs,
>>                       LXBFCR_BF2 | LXBFCR_BF1, val);
>>
>> @@ -785,6 +790,12 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
>>               drm_fmt_no_alpha = get_pixelformat_without_alpha(drm_fmt);
>>               if (!drm_fmt_no_alpha)
>>                       continue;
>> +
>> +             /* Manage hw-specific capabilities */
>> +             if (ldev->caps.non_alpha_only_l1 &&
>> +                 type != DRM_PLANE_TYPE_PRIMARY)
>> +                     continue;
>> +
>>               formats[nb_fmt++] = drm_fmt_no_alpha;
>>       }
>>
>> @@ -913,10 +924,19 @@ static int ltdc_get_caps(struct drm_device *ddev)
>>       case HWVER_10300:
>>               ldev->caps.reg_ofs = REG_OFS_NONE;
>>               ldev->caps.pix_fmt_hw = ltdc_pix_fmt_a0;
>> +             /*
>> +              * Hw older versions support non-alpha color formats derived
>> +              * from native alpha color formats only on the primary layer.
>> +              * For instance, RG16 native format without alpha works fine
>> +              * on 2nd layer but XR24 (derived color format from AR24)
>> +              * does not work on 2nd layer.
>> +              */
>> +             ldev->caps.non_alpha_only_l1 = true;
>>               break;
>>       case HWVER_20101:
>>               ldev->caps.reg_ofs = REG_OFS_4;
>>               ldev->caps.pix_fmt_hw = ltdc_pix_fmt_a1;
>> +             ldev->caps.non_alpha_only_l1 = false;
>>               break;
>>       default:
>>               return -ENODEV;
>> diff --git a/drivers/gpu/drm/stm/ltdc.h b/drivers/gpu/drm/stm/ltdc.h
>> index edd1c0a446d1..edb268129c54 100644
>> --- a/drivers/gpu/drm/stm/ltdc.h
>> +++ b/drivers/gpu/drm/stm/ltdc.h
>> @@ -17,6 +17,7 @@ struct ltdc_caps {
>>       u32 reg_ofs;            /* register offset for applicable regs */
>>       u32 bus_width;          /* bus width (32 or 64 bits) */
>>       const u32 *pix_fmt_hw;  /* supported pixel formats */
>> +     bool non_alpha_only_l1; /* non-native no-alpha formats on layer 1 */
>>   };
>>
>>   struct ltdc_device {
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-02-08  9:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 10:42 [PATCH v1 0/2] drm/stm: ltdc: add non-alpha color formats Philippe Cornu
2018-02-01 10:42 ` Philippe Cornu
2018-02-01 10:42 ` [PATCH v1 1/2] " Philippe Cornu
2018-02-01 10:42   ` Philippe Cornu
2018-02-05 19:23   ` kbuild test robot
2018-02-05 19:23     ` kbuild test robot
2018-02-06  9:12   ` Yannick FERTRE
2018-02-06  9:12     ` Yannick FERTRE
2018-02-08  9:40     ` Benjamin Gaignard
2018-02-08  9:40       ` Benjamin Gaignard
2018-02-08 15:02       ` Philippe CORNU
2018-02-01 10:42 ` [PATCH v1 2/2] drm/stm: ltdc: remove non-alpha color formats on layer 2 for older hw Philippe Cornu
2018-02-01 10:42   ` Philippe Cornu
2018-02-06  9:13   ` Yannick FERTRE
2018-02-08  9:40     ` Benjamin Gaignard [this message]
2018-02-08  9:40       ` Benjamin Gaignard

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=CA+M3ks7TWeHg1YK6+wR46XSxv0R6ftvLdAkeXBV6mvfA40kRgA@mail.gmail.com \
    --to=benjamin.gaignard@linaro.org \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@st.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabien.dessenne@st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mickael.reulier@st.com \
    --cc=philippe.cornu@st.com \
    --cc=vincent.abriou@st.com \
    --cc=yannick.fertre@st.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.