[{"id":14885,"web_url":"https://patchwork.libcamera.org/comment/14885/","msgid":"<YBgqKtr/d7SlrBbB@oden.dyn.berto.se>","date":"2021-02-01T16:19:54","subject":"Re: [libcamera-devel] [PATCH 1/2] utils: gen-formats: Support\n\tbig-endian DRM formats","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 work.\n\nOn 2021-01-31 20:43:51 +0200, Laurent Pinchart wrote:\n> DRM 4CCs are defined in little-endian, and can be declined in a\n> big-endian version by setting bit 31 (DRM_FORMAT_BIG_ENDIAN) in the 4CC\n> value.\n> \n> Add support for such formats in the gen-formats.py script.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  utils/gen-formats.py | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/utils/gen-formats.py b/utils/gen-formats.py\n> index 60dcecc345d5..da79a8bbba3a 100755\n> --- a/utils/gen-formats.py\n> +++ b/utils/gen-formats.py\n> @@ -59,10 +59,13 @@ def generate_h(formats, drm_fourcc):\n>  \n>      for format in formats:\n>          name, format = format.popitem()\n> +        fourcc = drm_fourcc.fourcc(format['fourcc'])\n> +        if format.get('big-endian'):\n> +            fourcc += '| DRM_FORMAT_BIG_ENDIAN'\n>  \n>          data = {\n>              'name': name,\n> -            'fourcc': drm_fourcc.fourcc(format['fourcc']),\n> +            'fourcc': fourcc,\n>              'mod': '0, 0',\n>          }\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9330AC33BB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Feb 2021 16:19:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 218966840D;\n\tMon,  1 Feb 2021 17:19:58 +0100 (CET)","from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com\n\t[IPv6:2a00:1450:4864:20::12f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5D40683FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Feb 2021 17:19:56 +0100 (CET)","by mail-lf1-x12f.google.com with SMTP id m22so23550072lfg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Feb 2021 08:19:56 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tk28sm3018802lfm.236.2021.02.01.08.19.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Feb 2021 08:19:55 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"GKyT0HkB\"; dkim-atps=neutral","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=U7pSenakQ0nu2wzuZ/DM5ixfrGguZzpL3b1aXZfFDJo=;\n\tb=GKyT0HkBbqbDktojunVJ7fr59pk2JPTNfJaj0dYNW0GI68tSPboOHMm8JExm0Y3xWa\n\thZwtaxyWw+mAE620gOtWCEoJwNFaRVI1KCka0LJTRfNQkrezAGWxOadrFEDnj/eiD4uD\n\t1D/Po+4Q6QNvEkgT1OYmNwgtEdSZa2fHk8mmeEauy6HX6iCnLWJECgOibYOt9oAdjBbj\n\tuRwQRyeGynRoRAa9pEpLsypd92AM+tOnnL/Zn8VoLVMo8LUarA0WBz35T1s2oPlkjHD3\n\t85mCcdf6IJagiqEviPfa0qhYAI81RYyqSYwBN26sFb0p6SdSZIKYK3iM9alsxxft4Ij4\n\tfHsA==","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=U7pSenakQ0nu2wzuZ/DM5ixfrGguZzpL3b1aXZfFDJo=;\n\tb=gsS+c3dfBket76JOh5hA9bWb4cfldN/iVk6EUp37rzMPlQPvZk16t3XbVl3RXqzwk4\n\tir5Zbi9ac4G/o9rvfLtbokPxOZdXepur8B2wYXExp/VzwPrfeH0LHGWnhcYm/hVZC4yL\n\toZzfjd7X185wgMnOTM5uocJYYcf0u4RC3Rx1hxJo+r75uihXOVcqVScBmtrnBPIvUPiq\n\tquSDuuKa4bzcHOoKTcF8mX7a9Cwcw7/ProPjebjmSnJIcTe/6s8HrFohjko7QZaMv13y\n\tzO3+2eP6xwVzj07OKkILUdTbcDUzAdrxpwx4WrmM/FY55WCh7owDroQ5nzfe4Z4TJx69\n\tC4wg==","X-Gm-Message-State":"AOAM532zH88Ubip3eESF0e/nQ4O/yKS3VGzJOu2kagpciNBAjqPw0dK7\n\t3CTVkI9OnoXpZrPZQLEJOY/H5cO14bJcIw==","X-Google-Smtp-Source":"ABdhPJxP/tHHVJTD1tOF20IxN7hfazeNj2gxwI8/bwNxuchZ5Nd76nbr2pWxzRPNWZooYh+dXs4cHA==","X-Received":"by 2002:a19:6c3:: with SMTP id 186mr5871307lfg.500.1612196396049;\n\tMon, 01 Feb 2021 08:19:56 -0800 (PST)","Date":"Mon, 1 Feb 2021 17:19:54 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<YBgqKtr/d7SlrBbB@oden.dyn.berto.se>","References":"<20210131184352.10635-1-laurent.pinchart@ideasonboard.com>\n\t<20210131184352.10635-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210131184352.10635-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] utils: gen-formats: Support\n\tbig-endian DRM formats","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]