[{"id":2320,"web_url":"https://patchwork.libcamera.org/comment/2320/","msgid":"<20190805174415.GF13149@pendragon.ideasonboard.com>","date":"2019-08-05T17:44:15","subject":"Re: [libcamera-devel] [PATCH 4/4] tests: camera-sensor: Drop check\n\ton media bus 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 Mon, Aug 05, 2019 at 05:51:33PM +0200, Niklas Söderlund wrote:\n> Linux commit b6c61a6c37317efd (\"media: vimc: propagate pixel format in\n> the stream\") changes the sensor in the vimc media graph to accept any\n> media bus format set on it. This prevents the camera-sensor test case to\n> verify that a supported media bus format is selected.\n\nIt's not any format, there's still an explicit list of supported formats\n(which grew quite long, I agree, and I don't think this is right, but\nthat's a separate issue - although if you have time to ping Helen about\nthis, it could be useful). In order to keep the test meaningful, how\nabout changing the first item in the list of formats passed to\ngetFormat() to a known to be invalid value (0xffff, 0xdeadbeef or\nanything similarly wrong) ?\n\n> In lack of a better fix remove the check for media bus format.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  test/camera-sensor.cpp | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp\n> index 092cbdd8111ce70d..a04b7333daecd9dd 100644\n> --- a/test/camera-sensor.cpp\n> +++ b/test/camera-sensor.cpp\n> @@ -87,10 +87,8 @@ protected:\n>  \t\t\t\t\t\t\t\t  MEDIA_BUS_FMT_SBGGR10_1X10,\n>  \t\t\t\t\t\t\t\t  MEDIA_BUS_FMT_BGR888_1X24 },\n>  \t\t\t\t\t\t\t\tSize(1024, 768));\n> -\t\tif (format.mbus_code != MEDIA_BUS_FMT_SBGGR10_1X10 ||\n> -\t\t    format.size != Size(4096, 2160)) {\n> -\t\t\tcerr << \"Failed to get a suitable format, expected 4096x2160-0x\"\n> -\t\t\t     << std::hex << MEDIA_BUS_FMT_SBGGR10_1X10\n> +\t\tif (format.size != Size(4096, 2160)) {\n> +\t\t\tcerr << \"Failed to get a suitable format, expected 4096x2160\"\n>  \t\t\t     << \", got \" << format.toString() << endl;\n>  \t\t\treturn TestFail;\n>  \t\t}","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 502AF60E33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Aug 2019 19:44:18 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BEECF2F9;\n\tMon,  5 Aug 2019 19:44:17 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1565027057;\n\tbh=ZaNKTOaMVFnZPe83tLEd1Mgw8djMth61MCUsdW6Y1bA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jXCP1LZ2a91v+7b+W8qLkgq1uJaU1u5uk+sSPk34tlwHYewNmj2PQay0E4gCdtXx5\n\tL8G4ziQEt/oyqa9xU0HD1rrbSce7OLGeRnNCIJAZBXyN1n3VzBJ/8bxasYcM0Kni7d\n\tx90rhMRZxzGNmWteBRUtFaWtaVYITXyYJ/R/QcX0=","Date":"Mon, 5 Aug 2019 20:44:15 +0300","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":"<20190805174415.GF13149@pendragon.ideasonboard.com>","References":"<20190805155133.11335-1-niklas.soderlund@ragnatech.se>\n\t<20190805155133.11335-5-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":"<20190805155133.11335-5-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 4/4] tests: camera-sensor: Drop check\n\ton media bus format","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Mon, 05 Aug 2019 17:44:18 -0000"}}]