[{"id":4040,"web_url":"https://patchwork.libcamera.org/comment/4040/","msgid":"<20200317090810.GB4864@pendragon.ideasonboard.com>","date":"2020-03-17T09:08:10","subject":"Re: [libcamera-devel] [PATCH v2 2/8] test: v4l2_videodevice:\n\tbuffer_cache: Use DRM pixel format","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Tue, Mar 17, 2020 at 04:52:33AM +0100, Niklas Söderlund wrote:\n> The pixel format used in the stream configuration is from V4L2 but\n> should be from DRM, fix it.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  test/v4l2_videodevice/buffer_cache.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp\n> index 0a8cb0d28ca9b204..c951bc9650dc4e0e 100644\n> --- a/test/v4l2_videodevice/buffer_cache.cpp\n> +++ b/test/v4l2_videodevice/buffer_cache.cpp\n> @@ -11,6 +11,8 @@\n>  \n>  #include <libcamera/stream.h>\n>  \n> +#include <linux/drm_fourcc.h>\n> +\n\nTo avoid including this header manually everywhere a PixelFormat is\nused, should we include it in pixelformats.h ?\n\nApart from that,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  #include \"buffer_source.h\"\n>  \n>  #include \"test.h\"\n> @@ -142,7 +144,7 @@ public:\n>  \t\tconst unsigned int numBuffers = 8;\n>  \n>  \t\tStreamConfiguration cfg;\n> -\t\tcfg.pixelFormat = V4L2_PIX_FMT_YUYV;\n> +\t\tcfg.pixelFormat = DRM_FORMAT_YUYV;\n>  \t\tcfg.size = Size(600, 800);\n>  \t\tcfg.bufferCount = numBuffers;\n>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5024460418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 10:08:16 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BB124F9;\n\tTue, 17 Mar 2020 10:08:15 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584436095;\n\tbh=xfTkzS6VmY5g90klJ1aGWTe/6ARJWgAK4OYKoxs5enQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oLXOLDBE/8JCi+Hppb3iRpWCcFyow0W2MN9EMiLqDr5+65bCxoCsBjtKqMi5vSdqV\n\tlAlRUai8GjqX6Nba6wYtjxG0bkseYEuzVGOTdXnyprqxflCm3xPBADrr6cqg1qOh6P\n\t0DRpYDjhX0heOxaXM80P9MEwRJ/YVOsMN6DuHGcg=","Date":"Tue, 17 Mar 2020 11:08:10 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200317090810.GB4864@pendragon.ideasonboard.com>","References":"<20200317035239.2697679-1-niklas.soderlund@ragnatech.se>\n\t<20200317035239.2697679-3-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200317035239.2697679-3-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 2/8] test: v4l2_videodevice:\n\tbuffer_cache: Use DRM pixel format","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 17 Mar 2020 09:08:16 -0000"}},{"id":4043,"web_url":"https://patchwork.libcamera.org/comment/4043/","msgid":"<20200317101619.GB2496015@oden.dyn.berto.se>","date":"2020-03-17T10:16:19","subject":"Re: [libcamera-devel] [PATCH v2 2/8] test: v4l2_videodevice:\n\tbuffer_cache: Use DRM pixel format","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your feedback.\n\nOn 2020-03-17 11:08:10 +0200, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> Thank you for the patch.\n> \n> On Tue, Mar 17, 2020 at 04:52:33AM +0100, Niklas Söderlund wrote:\n> > The pixel format used in the stream configuration is from V4L2 but\n> > should be from DRM, fix it.\n> > \n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  test/v4l2_videodevice/buffer_cache.cpp | 4 +++-\n> >  1 file changed, 3 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp\n> > index 0a8cb0d28ca9b204..c951bc9650dc4e0e 100644\n> > --- a/test/v4l2_videodevice/buffer_cache.cpp\n> > +++ b/test/v4l2_videodevice/buffer_cache.cpp\n> > @@ -11,6 +11,8 @@\n> >  \n> >  #include <libcamera/stream.h>\n> >  \n> > +#include <linux/drm_fourcc.h>\n> > +\n> \n> To avoid including this header manually everywhere a PixelFormat is\n> used, should we include it in pixelformats.h ?\n\nI like it, I will add a patch for this.\n\n> \n> Apart from that,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> >  #include \"buffer_source.h\"\n> >  \n> >  #include \"test.h\"\n> > @@ -142,7 +144,7 @@ public:\n> >  \t\tconst unsigned int numBuffers = 8;\n> >  \n> >  \t\tStreamConfiguration cfg;\n> > -\t\tcfg.pixelFormat = V4L2_PIX_FMT_YUYV;\n> > +\t\tcfg.pixelFormat = DRM_FORMAT_YUYV;\n> >  \t\tcfg.size = Size(600, 800);\n> >  \t\tcfg.bufferCount = numBuffers;\n> >  \n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EB91860418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 11:16:20 +0100 (CET)","by mail-lf1-x141.google.com with SMTP id n20so13318674lfl.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 03:16:20 -0700 (PDT)","from localhost (h-200-138.A463.priv.bahnhof.se. [176.10.200.138])\n\tby smtp.gmail.com with ESMTPSA id\n\tz12sm2100751lfe.51.2020.03.17.03.16.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Mar 2020 03:16:19 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=zSqJho6bs1iEXt9q0N2XD0mEGYRjPgUYXNxgIhIafNU=;\n\tb=JKPM5uLtO7X8doMxuULBCd5T4SMU7dGRvl9D8684RuFoTductVJODL8QU7lBBb3d65\n\tovTDfQI2MIpv2xUctnheRK+ccr2pVDJjRQkKqIs7AXuCF5wGJ4QEMco8kZcMJ3GHR9SP\n\tJAKIY5NxrfEMPoqV9QuaLVLmAtA5ZpNaKRiHQnmMq8x9o6ZunyqeF8x+CQ1MXM7nY4fj\n\t/PklC1zYSmR6VSDiIA5p61jdMJKNWcATxOclVDFxM8HKJmpJ0cIWevLYu8fAPcpnUozG\n\tt2O3j0S9u8wDlBfttKSzr8Fqm4EB0ErFnXiu/4C/t/Jxy4fMd9KJdgeeOUA+Ej/uMR22\n\thjzw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=zSqJho6bs1iEXt9q0N2XD0mEGYRjPgUYXNxgIhIafNU=;\n\tb=tYUCn/aptthqoSqaTUKZFBuF9xA6CmMdiGhvjZ0tcW/VfrqQ9yRTQx4XVEMQjMBYzP\n\tE/yrGSsSMsxI33Q8tyBCjW67I1LVTYoWfekX//TNtbU05639KEZ2I3WerTL+t/RyGxQU\n\taFO2gIbs0+PynLweh4Nt1gOtz/2mJEQjBz6Uo6bmYTC1QqpuFswupS8ugxTd4fUi2xr+\n\toNTy8K+rb4x5tMj9+NI7ihME0f+E/ZIHEZSGQ6hQSyKwSETndpmldXCGcZ9OD4uQZ+fb\n\tlUxtUiGhbZFhGTbmXAfMBf954qwh68G7zEM/V3PVvEHTnHFCgW7L1TH88tmilYBQfEcd\n\tQIdg==","X-Gm-Message-State":"ANhLgQ1EVbXVDfHJq4VOqaBNOk6NzfEZqc4NEwALZ1hYp1y/JFgvhE7l\n\tKYxro4AAH+6bziFQNCecR3yuVg==","X-Google-Smtp-Source":"ADFU+vv/BWRqfgEpfzxdb68wgA9ZN0U3ebE0ukEsKdV/yc3YA3oQJZFQvslg99VdeVDK6Lt2BxOUYA==","X-Received":"by 2002:ac2:5605:: with SMTP id v5mr2552253lfd.184.1584440180263;\n\tTue, 17 Mar 2020 03:16:20 -0700 (PDT)","Date":"Tue, 17 Mar 2020 11:16:19 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200317101619.GB2496015@oden.dyn.berto.se>","References":"<20200317035239.2697679-1-niklas.soderlund@ragnatech.se>\n\t<20200317035239.2697679-3-niklas.soderlund@ragnatech.se>\n\t<20200317090810.GB4864@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200317090810.GB4864@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 2/8] test: v4l2_videodevice:\n\tbuffer_cache: Use DRM pixel format","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 17 Mar 2020 10:16:21 -0000"}}]