From: Cho KyongHo Date: Thu, 12 Oct 2017 08:03:25 +0000 (+0900) Subject: [COMMON] video: hdr: add tunable parameters for HDR X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49fe0ca468957584a119d3bb475fb3e115e09267;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] video: hdr: add tunable parameters for HDR It is required to tune HDR LUT values during runtime because the quality of HDR processing is measured on the display of DUT. It means that some LUT values including LUTs of tone mapping might need to be tunned if the display controller or LCD is changed. Change-Id: Ic927345a25f6b2d45d7be9de47f2a0574514ff64 Signed-off-by: Cho KyongHo --- diff --git a/drivers/gpu/exynos/Kconfig b/drivers/gpu/exynos/Kconfig index e9bf19f4f52e..8dd2387b8cdb 100644 --- a/drivers/gpu/exynos/Kconfig +++ b/drivers/gpu/exynos/Kconfig @@ -1,3 +1,15 @@ + +config EXYNOS_HDR_TUNABLE_TONEMAPPING + bool "HDR Tuneable debugfs nodes for Tone mapping" + ---help--- + Creates hdr/tm_x and hdr/tm_y nodes under debugfs for overriding the + tone mapping LUT coefficients configured in G2D and DPU with the + values stored in the nodes. Configuring 33 integer values to both + nodes immediately replaces the tone mapping LUT coefficients used by + G2D and DPU. Writing 0 to one of both nodes stops overriding. + + This is just for display tunning purpose only for HDR videos. + menu "Exynos Graphic Devices" source "drivers/gpu/exynos/g2d/Kconfig" endmenu diff --git a/drivers/gpu/exynos/Makefile b/drivers/gpu/exynos/Makefile index a00af4e1b64c..d5e3b24f1679 100644 --- a/drivers/gpu/exynos/Makefile +++ b/drivers/gpu/exynos/Makefile @@ -1 +1,2 @@ +obj-$(CONFIG_EXYNOS_HDR_TUNABLE_TONEMAPPING) += hdr_tunables.o obj-$(CONFIG_EXYNOS_GRAPHICS_G2D) += g2d/ diff --git a/drivers/gpu/exynos/hdr_tunables.c b/drivers/gpu/exynos/hdr_tunables.c new file mode 100644 index 000000000000..891f732b0318 --- /dev/null +++ b/drivers/gpu/exynos/hdr_tunables.c @@ -0,0 +1,68 @@ +/* + * linux/drivers/gpu/exynos/hdr_tunables.c + * + * Copyright (C) 2017 Samsung Electronics Co., Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#include +#include + +#include