Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460233
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ville Syrjälä <ville.syrjala@linux.intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 3/4] drm/mediatek: Add gamma correction. |
| Date | Thu, 11 Aug 2016 09:50:01 +0200 |
| Message-ID | <s4SUx-Rd-15@gated-at.bofh.it> (permalink) |
| References | <rZJfb-8aJ-3@gated-at.bofh.it> <rZJfb-8aJ-9@gated-at.bofh.it> <s4SUx-Rd-17@gated-at.bofh.it> |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.28,503,1464678000"; d="scan'208";a="1039160143" |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1 |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 69 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Bibby Hsieh <bibby.hsieh@mediatek.com>, linux-kernel@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>, Cawa Cheng <cawa.cheng@mediatek.com>, dri-devel@lists.freedesktop.org, Mao Huang <littlecvr@chromium.org>, linux-mediatek@lists.infradead.org, Sascha Hauer <kernel@pengutronix.de>, Matthias Brugger <matthias.bgg@gmail.com>, Yingjoe Chen <yingjoe.chen@mediatek.com>, linux-arm-kernel@lists.infradead.org |
| X-Original-Date | Thu, 11 Aug 2016 10:44:10 +0300 |
| X-Original-Message-ID | <20160811074410.GF4329@intel.com> |
| X-Original-References | <1469672575-5847-1-git-send-email-bibby.hsieh@mediatek.com> <1469672575-5847-4-git-send-email-bibby.hsieh@mediatek.com> <1470900779.2493.20.camel@pengutronix.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1460233 |
Show key headers only | View raw
On Thu, Aug 11, 2016 at 09:32:59AM +0200, Philipp Zabel wrote:
> Am Donnerstag, den 28.07.2016, 10:22 +0800 schrieb Bibby Hsieh:
> > Add gamma set function to correct brightness values.
> > It applies arbitrary mapping curve to compensate the
> > incorrect transfer function of the panel.
> >
> > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > ---
> > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 8 ++++++-
> > drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 1 +
> > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 31 +++++++++++++++++++++++++++
> > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 10 +++++++++
> > 4 files changed, 49 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > index 24aa3ba..cbb460a5 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > @@ -409,6 +409,9 @@ static void mtk_drm_crtc_atomic_flush(struct drm_crtc *crtc,
> > }
> > if (pending_planes)
> > mtk_crtc->pending_planes = true;
> > + if (crtc->state->color_mgmt_changed)
> > + for (i = 0; i < mtk_crtc->ddp_comp_nr; i++)
> > + mtk_ddp_gamma_set(mtk_crtc->ddp_comp[i], crtc->state);
> > }
> >
> > static const struct drm_crtc_funcs mtk_crtc_funcs = {
> > @@ -418,6 +421,7 @@ static const struct drm_crtc_funcs mtk_crtc_funcs = {
> > .reset = mtk_drm_crtc_reset,
> > .atomic_duplicate_state = mtk_drm_crtc_duplicate_state,
> > .atomic_destroy_state = mtk_drm_crtc_destroy_state,
> > + .gamma_set = drm_atomic_helper_legacy_gamma_set,
> > };
> >
> > static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {
> > @@ -568,7 +572,9 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> > &mtk_crtc->planes[1].base, pipe);
> > if (ret < 0)
> > goto unprepare;
> > -
> > + drm_mode_crtc_set_gamma_size(&mtk_crtc->base, MTK_LUT_SIZE);
> > + drm_helper_crtc_enable_color_mgmt(&mtk_crtc->base, MTK_LUT_SIZE,
> > + MTK_LUT_SIZE);
>
> I have applied all four patches and rebased onto v4.8-rc1, replacing
> drm_helper_crtc_enable_color_mgmt with:
>
> drm_crtc_enable_color_mgmt(&mtk_crtc->base, MTK_LUT_SIZE,
> true, MTK_LUT_SIZE);
BTW that looks wrong (already in the original). AFAICS the patch just
handled the gamma_lut, not the degamma_lut, so telling you have both
is not right.
>
> (See https://patchwork.kernel.org/patch/9160987/)
>
> regards
> Philipp
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel OTC
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/4] drm/mediatek: MT8173 gamma & dither support Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-07-28 04:30 +0200
[PATCH v4 4/4] drm/mediatek: set mt8173 dithering function Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-07-28 04:30 +0200
[PATCH v4 3/4] drm/mediatek: Add gamma correction. Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-07-28 04:30 +0200
Re: [PATCH v4 3/4] drm/mediatek: Add gamma correction. Ville Syrjälä <ville.syrjala@linux.intel.com> - 2016-08-11 09:50 +0200
Re: [PATCH v4 3/4] drm/mediatek: Add gamma correction. Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-11 10:00 +0200
Re: [PATCH v4 3/4] drm/mediatek: Add gamma correction. Ville Syrjälä <ville.syrjala@linux.intel.com> - 2016-08-11 10:10 +0200
Re: [PATCH v4 3/4] drm/mediatek: Add gamma correction. Daniel Vetter <daniel@ffwll.ch> - 2016-08-11 11:00 +0200
Re: [PATCH v4 3/4] drm/mediatek: Add gamma correction. Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-11 10:00 +0200
[PATCH v4.5 3/4] drm/mediatek: Add gamma correction. Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-11 11:20 +0200
[PATCH v4 2/4] drm/mediatek: Add GAMMA engine basic function Bibby Hsieh <bibby.hsieh@mediatek.com> - 2016-07-28 04:30 +0200
csiph-web