From patchwork Fri Sep 7 21:46:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satish Kumar Nagireddy X-Patchwork-Id: 10593641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0EF7E109C for ; Mon, 10 Sep 2018 07:11:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F040628C1B for ; Mon, 10 Sep 2018 07:11:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E457B28C1E; Mon, 10 Sep 2018 07:11:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E478428C1B for ; Mon, 10 Sep 2018 07:11:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A80E6E24A; Mon, 10 Sep 2018 07:09:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0052.outbound.protection.outlook.com [104.47.32.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 653516E980 for ; Fri, 7 Sep 2018 21:46:42 +0000 (UTC) Received: from BN6PR02CA0100.namprd02.prod.outlook.com (2603:10b6:405:60::41) by BN6PR02MB2676.namprd02.prod.outlook.com (2603:10b6:404:fa::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.18; Fri, 7 Sep 2018 21:46:38 +0000 Received: from SN1NAM02FT004.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::204) by BN6PR02CA0100.outlook.office365.com (2603:10b6:405:60::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.16 via Frontend Transport; Fri, 7 Sep 2018 21:46:38 +0000 Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT004.mail.protection.outlook.com (10.152.72.175) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1122.15 via Frontend Transport; Fri, 7 Sep 2018 21:46:38 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:46904 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fyOaM-000492-3B for dri-devel@lists.freedesktop.org; Fri, 07 Sep 2018 14:46:38 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fyOaG-0006La-Vs for dri-devel@lists.freedesktop.org; Fri, 07 Sep 2018 14:46:33 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w87LkPcv012498; Fri, 7 Sep 2018 14:46:25 -0700 Received: from [172.19.2.102] (helo=xsjanandash50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fyOa9-0006KI-GB; Fri, 07 Sep 2018 14:46:25 -0700 From: Satish Kumar Nagireddy To: Subject: [RFC PATCH] drm: Add new DIRTY fb flags to pass interlaced alternate fields Date: Fri, 7 Sep 2018 14:46:21 -0700 Message-ID: <1536356781-12882-1-git-send-email-satish.nagireddy.nagireddy@xilinx.com> X-Mailer: git-send-email 2.7.4 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39860400002)(376002)(136003)(346002)(2980300002)(438002)(189003)(199004)(9786002)(4326008)(48376002)(51416003)(8676002)(2906002)(7696005)(305945005)(316002)(50466002)(106002)(356003)(107886003)(63266004)(36756003)(106466001)(47776003)(478600001)(72206003)(2351001)(16586007)(36386004)(81166006)(81156014)(126002)(5660300001)(14444005)(6666003)(6916009)(336012)(476003)(50226002)(486006)(2616005)(8936002)(426003)(77096007)(186003)(26005)(107986001)(14143004)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR02MB2676; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT004; 1:6SG42La9A7XecEO/TGd66bguHWWRBkp9cVlKv3eaRWVh+7ZRVdhfBk+xBx9kaSf8NFd0C3Geo2dDybaAcZysJblDdaicwYnn4YE1Ts9tR/2FtYt1aifcPqCi4h/VN4u9 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f20b3aa7-9d3f-4449-9be2-08d6150b63f9 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BN6PR02MB2676; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2676; 3:VT5bBoGd/hivqe9ovcgxFCc/EQ4GYPEGu1YougwFdgrE5CCjqBPaIR8hh30h2jUTiSRaTmgA3dCO8Oa2mGdk47b/LOaS97eBRNRRdil0st3MyvSjBQ7w/9b0ZVtY2U4KsCy2tVdIYQBRAX/X6v2IjEJGEOhWhY72m0MCjF2cZ/4OgQEB/OT4ONbtDkemltAnxCP+pYk3XjfPPtPozqSo7L7kv0nnk2LkM9+setLux1/RBz9MQ+fFpd3tfI2xGfmNEoHnhPMXJDqqneGjaQSKowm7g3QmtkkuzME/Wnq9c/fWNd4Vgi10I5pb9NJFlZBAQrACiqTYCAzdI02HgIIAp6VsWWbFDrpHU5ojLT3suLo=; 25:s9zzt0GHJOUliDyu0KNTC4np8wiCM+tWH43yvd4YPWEcYueIDHuMzuVePgbqZoUBktj8OwqDTQyFHSqG3KHWz6XmF4c9rVWpPUZyb9By4QiBEL+qO2jGVOKaZxZRcjVMfkNPBhMin3tu+uJKxi22F89KEY1JepjV5GvQiVw/7qTk9C84mGNeu+4gMfdAPX8LIJXE+v6ZzGyTprbCTqsLql9B5aa6JpXFTEBf+h8mvbp0dU+FpMpjavpmejtPTk/v2gYZXz2aDoKSmlEWWIFf0UHnvPLknqIyZwkx6v7hLwSeXNTnpVzOBM7MDirrVuxIeC/PfCKMUwBI6iHu1CysRg== X-MS-TrafficTypeDiagnostic: BN6PR02MB2676: X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2676; 31:+qj1GzcNwU4VIGP5E2aYYVG53RrrclUiYdo6Ex0x3wswp4mF1BXQdR2ks5BSXj7zB9kdQgENG4T0GZcsSwXoaEtjjLl+UGq+OjlWBr535bDdTTWSCOPszRM1t9r5ZQwzsDK1xbGvqcmh2DJJY+j1t0/+avOvWBAcjuaNDNPuTujRGH+wRfBLc+pFoZiFlSM8GCOKeM1WQBzjxX7F5h3uen/y7nov2giCUhymx5PQtXA=; 20:WuYKhCvaHC0lyMGoNuZ/JjBvKWQF8TY4y12Qt55OXGtj1REotk8DDFWbCPjGvDmQ0vTEZCFRTu5G6aKdfBTcjRwD67mGW3YoaxuzbWgDPQ0xc+EmMV0O5fksTDn+ygVx3IvH1ZOD3oRyIAvh7HO+ZcvyGcGVY+7l/FZZ28VrecTiy3YclJVyMzfmctm+EDT1FXc9hSEQ9P77M3vAs8n/Jb7180tkrGuGxev+yjh86n00QQvebkwaeE0M3V9QHFDYQUCLSo4dNGDkjH3SeC++fjWUkkxwyWlNGGneBUW03XF8vqCgpx9+7hGA5bLcoqLHjtLTvQ33K6x/0ylRWh6HbEvG8NT24jTIxOe+7sOxMGVgpeB5J+OyKj9PpLy9+R34xJbMzbPppV0GofgeKGUTkKOv3kaqDL2nUuxC3rImwQ61/IuBfelu5BkQV4enY1XV0OUWgPqhqVJh5JNHQ8plduM0pcLseTJaoKjo2ojG8k7FIaxFFG3usUfU6Q4twX7/ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699050); SRVR:BN6PR02MB2676; BCL:0; PCL:0; RULEID:; SRVR:BN6PR02MB2676; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB2676; 4:izW/fuI16whdDclwpWJ5fzuwAHwVbA+EEtQkfzvht6W+PIPr1Sc0qaUZJdIUoNgZb7x8fMF4YEl5R/qP4ySfVd3v8/1X6CciGhD2NOda8wMm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j+QoOpD9i0DqXdaBkvJbfyBcFNlfoBUe0yOscDxTl5vg2h9ujLQVU32pMBkrRCyRIU+fbyfaL6W/erUGBFwyycQUaAAiipumfHAs1D+ZHSmXxbJR5qjb0DKI+EdiAB0gx9x2m4JLtj/d+J2C7LWbCO8uE4aCfeoAleUlyKqen8pLOOLB9dWUoNp9QuDJ5/tdCw==; 5:Fzh3SuTJuZkaYDozqGF2ASdChdVd2Xx+qgS9yeOl5RbkdZmlMHSQWo2Ad25Zbd42dweIWxnVvvJP4OZt7JiFJqkYGxbUGi4hdAyRW5hM2Rhn2q7PBmHx6QjmTJHdfCOXnWUIDcSww3WWptbjRzsnF8BENSKsDd6nYR5ZjH+sOYY=; 7:yyKiGmyYAayFdUyeMQMP+3S/5Z+AEW4Ri+D23lwsf+rInLE6coAludblYGADgB43lfAt+iLsDbXq9gaxhPtBlLUWVv5ci6o+tzoEGhR5UMdsX85xeP0qWfoVxwh+3WF/RyaMD2Ibl/duOA8xEVAd/Uo+zUL+A7WqW7BKDgMRB6j0ThUbaoS8YQ571PgLbBhvkZaEpuamBqKoJE/iKDVcXhfRKhSPt6xxxVPa/yPGF1DvKUPK8Btr5oGJ7Y8HvjpU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2018 21:46:38.4380 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f20b3aa7-9d3f-4449-9be2-08d6150b63f9 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2676 X-Mailman-Approved-At: Mon, 10 Sep 2018 07:09:17 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Satish Kumar Nagireddy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The requirement is to render interlaced alternate buffers. In case of alternate, top field and bottom field are in two different buffers. The question is, can we pass existing flags DRM_MODE_PRESENT_TOP_FIELD and DRM_MODE_PRESENT_TOP_FIELD to DRM_IOCTL_MODE_SETPLANE ioctl? But in case if urrent frame out of display range, application will invoke DRM_IOCTL_MODE_PAGE_FLIP ioctl. So, it is not guaranteed that application will always call setplane(), it may also call page_flip(). Then we will have to introduce two more flags to pass with page_flip() ioctl, which is complicating things. Background of DRM_IOCTL_MODE_DIRTYFB ioctl: This ioctl is defined, so that userspace can notify the driver that an area of framebuffer has changed and should be flushed to display hardware. The proposed solution is to introduce new dirty fb flags, so that userspace can pass them with every alternate field buffer and the same is reached display hardware. This patch adds new dirty framebuffer flags, so that application can pass interlaced alternate field information to driver. Signed-off-by: Satish Kumar Nagireddy --- include/uapi/drm/drm_mode.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index ce7efe2..40fef85 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -428,7 +428,9 @@ struct drm_mode_fb_cmd2 { #define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 -#define DRM_MODE_FB_DIRTY_FLAGS 0x03 +#define DRM_MODE_FB_DIRTY_TOP_FIELD 0x03 +#define DRM_MODE_FB_DIRTY_BOTTOM_FIELD 0x04 +#define DRM_MODE_FB_DIRTY_FLAGS 0x07 #define DRM_MODE_FB_DIRTY_MAX_CLIPS 256