Re: [Intel-gfx] [PATCH v2] drm/i915: correct the pitch check for NV12 framebuffer

2018-12-12 Thread Hwang, Dongseong
On Wed, Dec 12, 2018 at 1:15 PM Ville Syrjälä
 wrote:
>
> On Wed, Dec 12, 2018 at 09:33:49PM +0100, Daniel Vetter wrote:
> > On Wed, Dec 12, 2018 at 9:24 PM Ville Syrjälä
> >  wrote:
> > >
> > > On Tue, Dec 11, 2018 at 04:39:05PM -0800, Dongseong Hwang wrote:
> > > > framebuffer for NV12 requires the pitch to the multiplier of 4, instead
> > > > of the width. This patch corrects it.
> > > >
> > > > For instance, a 480p video, whose width and pitch are 854 and 896
> > > > respectively, is excluded for NV12 plane so far.
> > > >
> > > > Signed-off-by: Dongseong Hwang 
> > > > Cc: Chandra Konduru 
> > > > Cc: Vidya Srinivas 
> > > > Cc: Ville Syrjälä 
> > > > Cc: Juha-Pekka Heikkila 
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_display.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/intel_display.c 
> > > > b/drivers/gpu/drm/i915/intel_display.c
> > > > index 13e5650..8a3de12 100644
> > > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > > @@ -14600,7 +14600,7 @@ static int intel_framebuffer_init(struct 
> > > > intel_framebuffer *intel_fb,
> > > >   if (fb->format->format == DRM_FORMAT_NV12 &&
> > > >   (fb->width < SKL_MIN_YUV_420_SRC_W ||
> > > >fb->height < SKL_MIN_YUV_420_SRC_H ||
> > > > -  (fb->width % 4) != 0 || (fb->height % 4) != 0)) {
> > > > +  (fb->pitches[0] % 4) != 0 || (fb->height % 4) != 0)) {
> > >
> > > The stride can never be misaligned like that. It'll be at least tile
> > > aligned, or 64 byte aligned with linear buffers.
> > >
> > > Anyways this entire piece of code doesn't make too much sense. The fb
> > > size doesn't really matter for us, only the src viewport size matters.
> > > That one we limit to a minimum of 2x2 pixels w/o scaling, and 16x16
> > > pixems w/ scaling. So looks like this code can be just ripped out.
> >
> > Do we have igt testcases for these cornercases in igt? Obviously would
> > need to be intel specific subtests ...
>
> Can't spot anything quite that specific. Someone would need to write
> one I suppose. Also Imre has a test somewhere on the list for testing
> the plane clipping underrun fails which tests small src viewport sizes,
> and JP has been working on a rotation vs. clipping test that is also
> somewhat related. Not sure if we could combine any of these somehow
> to avoid having too many similar tests.

Ap pointed out there is i915 workaround

1106 Display NV12, Rotation, Horizontal flip
Display corruption/color shift observed when using NV12 with 270
rotation or 90 rotation + horizontal flip.
WA: NV12 with 270 rotation or 90 rotation + horizontal flip requires
the programmed plane height to be a multiple of 4.
GEN9:ALL
GLK:ALL
GLV:ALL
CNL:*:A
CNL:*:B

I think this condition was introduced to deal with the workaround, and
I think the stride restriction is enough for the above workaround.
Ville, if I add the igt covering this change, is it good to land?

Best regards,
Dongseong


>
> --
> Ville Syrjälä
> Intel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 0/8] Adding NV12 support for SKL display

2017-08-09 Thread Hwang, Dongseong
I tested it on my Kaby Lake chromebook, and it works perfectly.

Best regards,
DS

On Thu, Aug 3, 2017 at 6:23 PM, Hwang, Dongseong
<dongseong.hw...@intel.com> wrote:
> Thank you for working on NV12 plane support. ChromeOS eagerly wants this
> feature to save power on Youtube. If it's landed soon, I'll really
> appreciate it.
>
> Kristian is working on backporting it to the downstream ChromeOS kernel.
> https://chromium-review.googlesource.com/c/601288
>
> I tested it on my Apollo Lake chromebook, but there is blackscreen
> flickering. NOTE: RGBA, RGBX, BGRA, BGRX, YUYV works without flickering.
> https://goo.gl/photos/tr5VfMiKeyEpDg9K6
>
> Best regards,
> DS
>
>
>
> On Tue, Jul 11, 2017 at 9:18 AM, Ville Syrjälä
> <ville.syrj...@linux.intel.com> wrote:
>>
>> On Tue, Jul 11, 2017 at 07:40:48PM +0530, Vidya Srinivas wrote:
>> > This patch series is adding NV12 support for Skylake display after
>> > rebasing on latest drm-intel-nightly. Initial series of the patches
>> > can be found here:
>> > https://lists.freedesktop.org/archives/intel-gfx/2015-May/066786.html
>> >
>> > Feature has been currently tested with custom linux based test tool
>> > IGT test development is under progress. Floating these patches for
>> > initial review. These NV12 patches are dependent on Ville's patches
>> > mentioned below.
>> >
>> > Update from last rev:
>> > Patches were initial reviewed last when floated but
>> > currently there was a design change with respect to
>> > - the way fb offset is handled
>> > - the way rotation is handled
>> > Rebase of the current NV12 patch series has been done as per the
>> > current changes on drm-intel-nightly.
>> > Review comments from Ville (12th June 2017) have been addressed
>> > Review comments from Clinton A Taylor (7th July 2017) have been
>> > addressed
>> > Review comments from Clinton A Taylor (10th July 2017) have been
>> > addressed. Had missed out tested-by/reviewed-by in the patches.
>> > Fixed that error in this series.
>> >
>> > Chandra Konduru (6):
>> >   drm/i915: Set scaler mode for NV12
>> >   drm/i915: Update format_is_yuv() to include NV12
>> >   drm/i915: Upscale scaler max scale for NV12
>> >   drm/i915: Add NV12 as supported format for primary plane
>> >   drm/i915: Add NV12 as supported format for sprite plane
>> >   drm/i915: Add NV12 support to intel_framebuffer_init
>> >
>> > Ville Syrjälä (2):
>> >   drm/i915: Implement .get_format_info() hook for CCS
>> >   drm/i915: Add render decompression support
>>
>> These two are some old stale versions of my CCS patches. I suppose it
>> shouldn't matter too much, as long as no one has based any userspace tests
>> on these since later versions will change how interpret fb->offsets[].
>>
>> >
>> >  drivers/gpu/drm/drm_fourcc.c |   2 +-
>> >  drivers/gpu/drm/i915/i915_reg.h  |  24 +++
>> >  drivers/gpu/drm/i915/intel_atomic.c  |   8 +-
>> >  drivers/gpu/drm/i915/intel_display.c | 313
>> > ---
>> >  drivers/gpu/drm/i915/intel_drv.h |   3 +-
>> >  drivers/gpu/drm/i915/intel_pm.c  |  29 +++-
>> >  drivers/gpu/drm/i915/intel_sprite.c  |  16 +-
>> >  include/drm/drm_mode_config.h|   3 +-
>> >  include/uapi/drm/drm_fourcc.h|   3 +
>> >  9 files changed, 365 insertions(+), 36 deletions(-)
>> >
>> > --
>> > 1.9.1
>> >
>> > ___
>> > Intel-gfx mailing list
>> > Intel-gfx@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>> --
>> Ville Syrjälä
>> Intel OTC
>> ___
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 0/8] Adding NV12 support for SKL display

2017-08-03 Thread Hwang, Dongseong
Thank you for working on NV12 plane support. ChromeOS eagerly wants this
feature to save power on Youtube. If it's landed soon, I'll really
appreciate it.

Kristian is working on backporting it to the downstream ChromeOS kernel.
https://chromium-review.googlesource.com/c/601288

I tested it on my Apollo Lake chromebook, but there is blackscreen
flickering. NOTE: RGBA, RGBX, BGRA, BGRX, YUYV works without flickering.
https://goo.gl/photos/tr5VfMiKeyEpDg9K6

Best regards,
DS



On Tue, Jul 11, 2017 at 9:18 AM, Ville Syrjälä <
ville.syrj...@linux.intel.com> wrote:

> On Tue, Jul 11, 2017 at 07:40:48PM +0530, Vidya Srinivas wrote:
> > This patch series is adding NV12 support for Skylake display after
> > rebasing on latest drm-intel-nightly. Initial series of the patches
> > can be found here:
> > https://lists.freedesktop.org/archives/intel-gfx/2015-May/066786.html
> >
> > Feature has been currently tested with custom linux based test tool
> > IGT test development is under progress. Floating these patches for
> > initial review. These NV12 patches are dependent on Ville's patches
> > mentioned below.
> >
> > Update from last rev:
> > Patches were initial reviewed last when floated but
> > currently there was a design change with respect to
> > - the way fb offset is handled
> > - the way rotation is handled
> > Rebase of the current NV12 patch series has been done as per the
> > current changes on drm-intel-nightly.
> > Review comments from Ville (12th June 2017) have been addressed
> > Review comments from Clinton A Taylor (7th July 2017) have been
> > addressed
> > Review comments from Clinton A Taylor (10th July 2017) have been
> > addressed. Had missed out tested-by/reviewed-by in the patches.
> > Fixed that error in this series.
> >
> > Chandra Konduru (6):
> >   drm/i915: Set scaler mode for NV12
> >   drm/i915: Update format_is_yuv() to include NV12
> >   drm/i915: Upscale scaler max scale for NV12
> >   drm/i915: Add NV12 as supported format for primary plane
> >   drm/i915: Add NV12 as supported format for sprite plane
> >   drm/i915: Add NV12 support to intel_framebuffer_init
> >
> > Ville Syrjälä (2):
> >   drm/i915: Implement .get_format_info() hook for CCS
> >   drm/i915: Add render decompression support
>
> These two are some old stale versions of my CCS patches. I suppose it
> shouldn't matter too much, as long as no one has based any userspace tests
> on these since later versions will change how interpret fb->offsets[].
>
> >
> >  drivers/gpu/drm/drm_fourcc.c |   2 +-
> >  drivers/gpu/drm/i915/i915_reg.h  |  24 +++
> >  drivers/gpu/drm/i915/intel_atomic.c  |   8 +-
> >  drivers/gpu/drm/i915/intel_display.c | 313
> ---
> >  drivers/gpu/drm/i915/intel_drv.h |   3 +-
> >  drivers/gpu/drm/i915/intel_pm.c  |  29 +++-
> >  drivers/gpu/drm/i915/intel_sprite.c  |  16 +-
> >  include/drm/drm_mode_config.h|   3 +-
> >  include/uapi/drm/drm_fourcc.h|   3 +
> >  9 files changed, 365 insertions(+), 36 deletions(-)
> >
> > --
> > 1.9.1
> >
> > ___
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Ville Syrjälä
> Intel OTC
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] libdrm/fourcc: Add formats R8, RG88, GR88, NV24, NV42

2016-04-21 Thread Hwang, Dongseong
As it's landed in kernel, it doesn't need ack from client users.
Sorry for noise.

In addition, I'll send new patch with tree and commit sha info.

- Dongseong

On Thu, Apr 21, 2016 at 7:06 PM, Hwang, Dongseong <dongseong.hw...@intel.com
> wrote:

> Hi Stéphane and Daniele,
>
> Could you give me lgtm?
> Daniel wants someone from client side to ack this change in order to land
> it.
>
> Kind Regards,
> Dongseong
>
> On Thu, Apr 21, 2016 at 7:02 PM, Dongseong Hwang <
> dongseong.hw...@intel.com> wrote:
>
>> Follow-up of kernel patch:
>> https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html
>>
>> Generate it using `make headers_install`
>>
>> ChromeOS will use new format to optimize video decoding.
>>
>> CC: Stéphane Marchesin <marc...@chromium.org>
>> CC: Daniele Castagna <dcasta...@chromium.org>
>> Cc: Rainer Hochecker <rainer.hochec...@onlinehome.de>
>> Cc: Benjamin Widawsky <benjamin.widaw...@intel.com>
>> CC: Chad Versace <chad.vers...@intel.com>
>> Signed-off-by: Dongseong Hwang <dongseong.hw...@intel.com>
>> ---
>>  include/drm/drm_fourcc.h | 11 ++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
>> index e741b09..bf68099 100644
>> --- a/include/drm/drm_fourcc.h
>> +++ b/include/drm/drm_fourcc.h
>> @@ -34,6 +34,13 @@
>>  /* color index */
>>  #define DRM_FORMAT_C8  fourcc_code('C', '8', ' ', ' ') /* [7:0]
>> C */
>>
>> +/* 8 bpp Red */
>> +#define DRM_FORMAT_R8  fourcc_code('R', '8', ' ', ' ') /* [7:0]
>> R */
>> +
>> +/* 16 bpp RG */
>> +#define DRM_FORMAT_RG88fourcc_code('R', 'G', '8', '8')
>> /* [15:0] R:G 8:8 little endian */
>> +#define DRM_FORMAT_GR88fourcc_code('G', 'R', '8', '8')
>> /* [15:0] G:R 8:8 little endian */
>> +
>>  /* 8 bpp RGB */
>>  #define DRM_FORMAT_RGB332  fourcc_code('R', 'G', 'B', '8') /* [7:0]
>> R:G:B 3:3:2 */
>>  #define DRM_FORMAT_BGR233  fourcc_code('B', 'G', 'R', '8') /* [7:0]
>> B:G:R 2:3:3 */
>> @@ -106,6 +113,8 @@
>>  #define DRM_FORMAT_NV21fourcc_code('N', 'V', '2', '1')
>> /* 2x2 subsampled Cb:Cr plane */
>>  #define DRM_FORMAT_NV16fourcc_code('N', 'V', '1', '6')
>> /* 2x1 subsampled Cr:Cb plane */
>>  #define DRM_FORMAT_NV61fourcc_code('N', 'V', '6', '1')
>> /* 2x1 subsampled Cb:Cr plane */
>> +#define DRM_FORMAT_NV24fourcc_code('N', 'V', '2', '4')
>> /* non-subsampled Cr:Cb plane */
>> +#define DRM_FORMAT_NV42fourcc_code('N', 'V', '4', '2')
>> /* non-subsampled Cb:Cr plane */
>>
>>  /*
>>   * 3 plane YCbCr
>> @@ -216,7 +225,7 @@
>>   * - multiple of 128 pixels for the width
>>   * - multiple of  32 pixels for the height
>>   *
>> - * For more information: see
>> http://linuxtv.org/downloads/v4l-dvb-apis/re32.html
>> + * For more information: see
>> https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
>>   */
>>  #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE  fourcc_mod_code(SAMSUNG,
>> 1)
>>
>> --
>> 2.5.0
>>
>>
>
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] libdrm/fourcc: Add formats R8, RG88, GR88

2016-04-21 Thread Hwang, Dongseong
Ok, I'll send new patch with the commit and tree.

Thanks and Regards,
Dongseong

On Thu, Apr 21, 2016 at 7:02 PM, Emil Velikov 
wrote:

> On 21 April 2016 at 16:32, Dongseong Hwang 
> wrote:
> > Follow-up of kernel patch:
> https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html
> >
> > The Kodi/XBMC and ChromeOS developers want to transcode NV12 to RGB
> > with OpenGL shaders, importing the two source planes through
> > EGL_EXT_image_dma_buf_import. That requires importing the Y plane as an
> > R8 EGLImage and the UV plane as either an RG88 or GR88 EGLImage.
> >
>
> Can we please add a note about the commit and tree where this is based on.
> See how Danel Vetter has done it recently (barring the typo
> -s/fromd/from/).
>
> Thank you !
> Emil
>
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] libdrm/fourcc: Add formats R8, RG88, GR88, NV24, NV42

2016-04-21 Thread Hwang, Dongseong
Hi Stéphane and Daniele,

Could you give me lgtm?
Daniel wants someone from client side to ack this change in order to land
it.

Kind Regards,
Dongseong

On Thu, Apr 21, 2016 at 7:02 PM, Dongseong Hwang 
wrote:

> Follow-up of kernel patch:
> https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html
>
> Generate it using `make headers_install`
>
> ChromeOS will use new format to optimize video decoding.
>
> CC: Stéphane Marchesin 
> CC: Daniele Castagna 
> Cc: Rainer Hochecker 
> Cc: Benjamin Widawsky 
> CC: Chad Versace 
> Signed-off-by: Dongseong Hwang 
> ---
>  include/drm/drm_fourcc.h | 11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
> index e741b09..bf68099 100644
> --- a/include/drm/drm_fourcc.h
> +++ b/include/drm/drm_fourcc.h
> @@ -34,6 +34,13 @@
>  /* color index */
>  #define DRM_FORMAT_C8  fourcc_code('C', '8', ' ', ' ') /* [7:0] C
> */
>
> +/* 8 bpp Red */
> +#define DRM_FORMAT_R8  fourcc_code('R', '8', ' ', ' ') /* [7:0] R
> */
> +
> +/* 16 bpp RG */
> +#define DRM_FORMAT_RG88fourcc_code('R', 'G', '8', '8') /*
> [15:0] R:G 8:8 little endian */
> +#define DRM_FORMAT_GR88fourcc_code('G', 'R', '8', '8') /*
> [15:0] G:R 8:8 little endian */
> +
>  /* 8 bpp RGB */
>  #define DRM_FORMAT_RGB332  fourcc_code('R', 'G', 'B', '8') /* [7:0]
> R:G:B 3:3:2 */
>  #define DRM_FORMAT_BGR233  fourcc_code('B', 'G', 'R', '8') /* [7:0]
> B:G:R 2:3:3 */
> @@ -106,6 +113,8 @@
>  #define DRM_FORMAT_NV21fourcc_code('N', 'V', '2', '1') /*
> 2x2 subsampled Cb:Cr plane */
>  #define DRM_FORMAT_NV16fourcc_code('N', 'V', '1', '6') /*
> 2x1 subsampled Cr:Cb plane */
>  #define DRM_FORMAT_NV61fourcc_code('N', 'V', '6', '1') /*
> 2x1 subsampled Cb:Cr plane */
> +#define DRM_FORMAT_NV24fourcc_code('N', 'V', '2', '4') /*
> non-subsampled Cr:Cb plane */
> +#define DRM_FORMAT_NV42fourcc_code('N', 'V', '4', '2') /*
> non-subsampled Cb:Cr plane */
>
>  /*
>   * 3 plane YCbCr
> @@ -216,7 +225,7 @@
>   * - multiple of 128 pixels for the width
>   * - multiple of  32 pixels for the height
>   *
> - * For more information: see
> http://linuxtv.org/downloads/v4l-dvb-apis/re32.html
> + * For more information: see
> https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
>   */
>  #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE  fourcc_mod_code(SAMSUNG, 1)
>
> --
> 2.5.0
>
>
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx