From patchwork Thu Mar 2 12:39:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Loacker X-Patchwork-Id: 63403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4215257wrd; Thu, 2 Mar 2023 04:49:38 -0800 (PST) X-Google-Smtp-Source: AK7set/gNIy4d8UkDcgrvkGTOCcO4STIAQ3txXNve7wmZz+/6KLv1GcIzkcZb/AOOlrg6+v6VkS9 X-Received: by 2002:a17:906:7ad3:b0:8b1:749f:b2c0 with SMTP id k19-20020a1709067ad300b008b1749fb2c0mr10227401ejo.74.1677761378272; Thu, 02 Mar 2023 04:49:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677761378; cv=pass; d=google.com; s=arc-20160816; b=F67Iwvjz6xwBGBs1i3NY0i+2N6fGZxbWUkZS5KBzs7rQ7d79pDWt9rbJ6zhzY+yTWX OvLhaUHofz0/hcNPPSxM6i49nQ4hbpWubWesEIv6CffvG3fDDqHv+Eea3FlAmsxBxfPg mF1d7k9hue+tsl7Zn9RPOKvLOUPUtsoQ3BFnT9cT3Z18A0zWvesSOfCjznETPzSMcSIp +a09bRKElBeeUfADILiARIiwO2Q57LLfmwWmF5AQapdmv74dyEjhZnk5zeNYXdoRVXLa DAaSAJf37m82gF2Qk1payHkdUbRRT8prHrPKJsg/f60emhoCKon7rIwfXeO6e6ZBco/2 HeRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=TrwQhU0q8pA2DL9u5e2P0tkoSCOTiVokBgBDBOJf+MM=; b=DLukFzrGyhZ7xtyGhc2qCCCWbsHmPd1LKXGSxE2Jwn/N6RSvR95Z6ep5eZhBEKajBV eDHAsQKfLoSeN3OFPov8mPkUDNJY1NEbKC0alue0+pnnN03dZi6ELZROCcV/sKDa5k3N 1sABHfPgCxtInNA04DMCKjjkVFx5B+YXYy8+RXuBi16x2YJIqp3vmw5vzCBsaQH3Ij5z paeALcllosIav8mO7wrkNqX3zvcT6KQmw1dNub40UFpnE/rK9fxAj4p1C14kbE3QGQrM y/YM5LExFMi9hB2SI6DqXROF9ZhfKUOWNNoGOofbC3dQBTVpDq+AaIjT9+Qd09HZKknf MsuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=P3g7Mjje; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a50ec91000000b004af625e4f0esi17901844edr.370.2023.03.02.04.49.15; Thu, 02 Mar 2023 04:49:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=P3g7Mjje; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229566AbjCBMlt (ORCPT + 99 others); Thu, 2 Mar 2023 07:41:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjCBMlr (ORCPT ); Thu, 2 Mar 2023 07:41:47 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2055.outbound.protection.outlook.com [40.107.21.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69C27498B5 for ; Thu, 2 Mar 2023 04:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X6BfUFwMxBG29ON2/C3di1XmBBhcvfmdMFJdYMYWMbVF8KRtyqMn050wG0y2MBtGYUdU9khpahWrgBfjQMEBHWT8UdBM0++6lGL+uVkOYfYrbNrFzSEX8t5TUJKcG+GM8siFs/u6M3vmGAEesSveFskOFXJcGzr/NFwWFyf040LI95rseszEMWyUYzg9Mk631GmO0rmGEGMW/9r3PVRHlAt6qxuqsWw1kb0zjHPhEgsatNGdTFhyP/oUA9SP9CGwaPToWuHjzQfu+tFWeqL8hHNPknMPiKLcKwZT/go2SM5H4Ihlx3V72fDZhk2m/5Cwna8Hp2/3IL8xdZOsKvLinw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TrwQhU0q8pA2DL9u5e2P0tkoSCOTiVokBgBDBOJf+MM=; b=LxwN5W3HU1iMZ5wupZIlP+GDhqdACp2xQdmF18nrSU0mNm3SdSIuunnBa3MXCY57mdVFsQHhO5b7eWIPT4xFBvXTIZYEiQMKx3Eiulwi1zIZmrektmFX8NjR1T/sOgj+PaYrbkE8MTyX+ikk0cMEMQjoZhKnyMN7GKQfdr2SvqgMWRZxK1+9sXUhxW0qP9yXcavtWqReHogR51eEC0JcTvBJzBAidKpRw1HGvTMf7/l3WCSekwjnxLlbF6icVTIWWDyROloItxcIPWYIacVeDwm2Jiq9IOISczMnIevOTnmo9Ft82/GFBTtygkNmVWtgrpq9FTqxnNFrN/MxldAR2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TrwQhU0q8pA2DL9u5e2P0tkoSCOTiVokBgBDBOJf+MM=; b=P3g7MjjecuGgViI0HwAcJRUXGaMv7QrJHI2GTiKgJjJLg/SPGIvBw0jlTe4oNviBgDBlErCEFpOVk/N6SQyUdPdpScn6lXfD3wE07islW8HFlS8SzCbAq4o5Ess+40ufqlA9ZnOGjpLwrKk1m8Zwu1okQ4CbuLE0T0aSm/IN/+A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VI1PR08MB4544.eurprd08.prod.outlook.com (2603:10a6:803:100::13) by DB9PR08MB8673.eurprd08.prod.outlook.com (2603:10a6:10:3d3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Thu, 2 Mar 2023 12:41:39 +0000 Received: from VI1PR08MB4544.eurprd08.prod.outlook.com ([fe80::cbc1:150c:e3af:5ee7]) by VI1PR08MB4544.eurprd08.prod.outlook.com ([fe80::cbc1:150c:e3af:5ee7%7]) with mapi id 15.20.6156.018; Thu, 2 Mar 2023 12:41:39 +0000 From: Gerald Loacker To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter , Michael Riesch , Gerald Loacker Subject: [PATCH] drm/rockchip: vop2: add polarity flags to RGB output Date: Thu, 2 Mar 2023 13:39:49 +0100 Message-Id: <20230302123949.957998-1-gerald.loacker@wolfvision.net> X-Mailer: git-send-email 2.37.2 X-ClientProxiedBy: VI1PR0502CA0033.eurprd05.prod.outlook.com (2603:10a6:803:1::46) To VI1PR08MB4544.eurprd08.prod.outlook.com (2603:10a6:803:100::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR08MB4544:EE_|DB9PR08MB8673:EE_ X-MS-Office365-Filtering-Correlation-Id: 35fbd6fc-f654-4cd3-d436-08db1b1b7817 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: il5oqvPi5jdFRXi2qBLXlVjwodYzAGf8fCUwzeTKUAqk83HB+KccYYPuxnaWzsyMgltgxgP2qoT9KrIgq+HudnMgCSV1Sxrus6+W8xVv5MEJihgXP/DqRcXosLE7PvJPnxHz551axy+AhejVz7fCp6xCYMTxLDWnX85BXExRznuPRf3AvFhYKE5zTqHjV6p7PwpFoxztz3YWZLHIy4FOfJjNzcCjSp43tBoXJmPtdmKwhbRQsG4d6ZoKeBI8TuQea9UqYtzjzsqLdDsCDH8cpLsE2vmbdnUhYgrVcy4DbvF5/MhEiav5p5s4UAGr6VQH4oP/GB6eLHVy1UX8epcO3GE/Yf3GJNDbSsHebfGDtGHtITuT4lR5KvhUmCLDhr+WFz5eX5KXQbx/zGrLnN++/zDhtAljNhT1dDTAJ379v6l3WuzSuAVyY3i8AxLMYa7lAH/K96JKeCKBkfksHSSIkK8+q9RcSgwpgUPRLTqLnCH4gpEKD+eNQjmmGtGMG7ftw+mvZnDJwFxSs5FvBFAKkOW8p+yT9vzFTs/jWl4T93iM+WTwThsZ0Gt9N3g9SjQ2DI0tnfYytg8Ylz/bkXs97UuAwHmEOkR+PIZQjV0Dg1XyYGttc0itaE3zjpluwVJbyHtkH/aBqYNR5jKtZGplgmAxsH1BDBw+Td9+vciZu7jgyX78FUO3LLI+GV+lt2Ji/x05dDwjEAOmTFUSTut4Yw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB4544.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(346002)(39850400004)(136003)(396003)(376002)(451199018)(66946007)(4326008)(66476007)(8676002)(66556008)(41300700001)(26005)(6666004)(6512007)(186003)(6506007)(107886003)(1076003)(36756003)(86362001)(4744005)(44832011)(2906002)(38350700002)(8936002)(5660300002)(38100700002)(83380400001)(54906003)(316002)(6486002)(2616005)(478600001)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ctFbKZH7axD3X417Fb6lC/J0DDvKeyIjKoJMMDhO7e+fKDehASGneHRiSb4EogQrudiWHZvgVXly8eJ1LT5VaFoBq4f3wySrSPahbXpSOTi/J4YIFSgIPZS1ye6l9YCbkATiE0A0pkyCW4n4ct9YgV59b4KC1H/LD2Gx3MBv3donZGHG2CoGY/jtcAs6tQNLkfu5OaP1uIbgyBRR6RB6zud80h9C0Dx3f/mTXd13j4yD8sMZiA0nTi2+nv7CzFWlTTeHIFBXjIBpK+a0KkVK2Of7eY6dyst8UUj6ibug98mjKO52Timhwyg2HIJcaRMliyYijhnm+KZ11W3ScwINRi3ts+0eYFULOBm098GjvCAJPij2LGD4ruGvuj3QlZwKLBlWy3QlJgJfiK1lpX0widIYEFoVD42kwaX6AvnAZ76iu+PQk5JnAuSnl+cAXIEJ66mtw4oBhpFtQ4jiMAVCjgkHHe9qk8BeUUGQsOqPy0w5v1leJPGox8AoRlWdIx+VM9Lt5gLgVph7LkzONnnLuioZ23HlcI9hch4a6nq8ccvt5ge3OQjVs4yMJizApyLV/m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atorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 35fbd6fc-f654-4cd3-d436-08db1b1b7817 X-MS-Exchange-CrossTenant-AuthSource: VI1PR08MB4544.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 12:41:39.7201 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6BiRASMInPPjxIad8QxH2xXdUxXtkGtMkbnz20cCvasKOQOPoNkkSFP1QOLWxnCNFFDg6g1CUqy6aUvkqT0TXNAZP4dDZXdznu0FQBacvHE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8673 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759260314533013420?= X-GMAIL-MSGID: =?utf-8?q?1759260314533013420?= Use h/v-sync and pixel clock polarity flags for RGB output. For all other outputs this is already implemented. Signed-off-by: Gerald Loacker --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 8cecf81a5ae0..e8b61973ade2 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1435,6 +1435,8 @@ static void rk3568_set_intf_mux(struct vop2_video_port *vp, int id, die &= ~RK3568_SYS_DSP_INFACE_EN_RGB_MUX; die |= RK3568_SYS_DSP_INFACE_EN_RGB | FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_RGB_MUX, vp->id); + dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL; + dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags); if (polflags & POLFLAG_DCLK_INV) regmap_write(vop2->grf, RK3568_GRF_VO_CON1, BIT(3 + 16) | BIT(3)); else