Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1524431rwb; Fri, 28 Jul 2023 10:34:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlERZqkRlorOR/Dh/QQZuwt1O3jIwPYLxqdnUG0AEOp9XQFpHuY3+3VmChyQKEixu5Kw/F1W X-Received: by 2002:a17:902:e885:b0:1bb:b2f7:e058 with SMTP id w5-20020a170902e88500b001bbb2f7e058mr2138718plg.52.1690565670837; Fri, 28 Jul 2023 10:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690565670; cv=none; d=google.com; s=arc-20160816; b=sHrd3/I5BBs9up6HRMWZk0zM/2Pi/DqQ9InpjoBc5OSEG4wt3puj/yDg1zwuTq/80X xd+XVPcan3wo11dkTLyppUB7AAgjaLC+A66dlzlLu0RirCnagUfUxgPimm6ZCtjwxHQ9 i1vuiJm74QKVEmQe83twpzWsGjxgKKh2/b4Vk/wFuhNmTU+FoAQy3WRVzRNfmywpiHNz yImtysHMSheGhh+dwv+UUkSQxpHu5HcxhvRCnn3PGj/Ddi5Azj55OsJ65JeJ3JO2Pnhr tLhs8uupqZ+nbZiFE7dvsQlEOxDxUEUO7OO2JZ5u6IzXqmbHlgZcKw7lsfMXvjX2/ohZ yiAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=xp79z04AEgh+xeGll4BlYu80qqmbaVErQS4456ex7kg=; fh=uR21f6Y7gVloD7/Gth73scWCecBWQpvog8nrDVRX+3A=; b=FkJl3H03ICSBw966q68yFAM6qvFuLoNeSZeG7FOCtSRVi+D5tFDohzxf6XRolgP5fV WvkPIxaRQ1G3hCqcHV11PLmNJXtFPp+3VbGtn+Zl3gP3RUTDS7JC85DKapp2G8F4Jg32 zXt15Dnc49xtGuzhCoXLfvDLa4UCBNKLfkxd/M7F7B24/RiIEuyCGJ3Ankao052qhGUa CeVoDSOoZELe0W3VwXhV9NRm6fBChhxaYJ5u6yt2ToyZhYV7ls1Wbq8OwWIdGIXrzLu7 kYMhEX9xYCGm3PHBTZaT7nol5ZrRxj0mo4ycqhMItkxDKvBWmInmaNFe2alr/aMIrUGb CcOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fb03X85w; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020a17090ad35300b0026838c7367esi3416747pjx.56.2023.07.28.10.34.17; Fri, 28 Jul 2023 10:34:30 -0700 (PDT) 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=@quicinc.com header.s=qcppdkim1 header.b=fb03X85w; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236084AbjG1RDq (ORCPT + 99 others); Fri, 28 Jul 2023 13:03:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235539AbjG1RDc (ORCPT ); Fri, 28 Jul 2023 13:03:32 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1293C2113; Fri, 28 Jul 2023 10:03:21 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36SDb4uT008309; Fri, 28 Jul 2023 17:02:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : date : subject : mime-version : content-type : content-transfer-encoding : message-id : references : in-reply-to : to : cc; s=qcppdkim1; bh=xp79z04AEgh+xeGll4BlYu80qqmbaVErQS4456ex7kg=; b=fb03X85wucDPKrXof+yCu2OVKUlIyZDAdiXrFdpKMVFRmDWiSdcR13yurkvY6f32Bxu5 bvzc131FUjhaRumQFq0O6f7U6516mg1v7t7MnNjBe8ysZhTS7Ve2wlDcOFp843fY0gAA NhXfuTRsqjmsqNAo3aZmqvaYYgOCJM9FxWBSHcwWeDRjgrmDbtMTJ3drZ5RTks4mSwkf ZPBVmxUDTFQ24q0y6mNi1TaxNuqHtpxQlZZmKwhlQRNQnbPgZ0rCGGjsLT27O5YoXy47 BOrvigfvrB+7E70z58nAg7eqUnf4UXvNgHliuM0RDNsiCFSbA7g4kEecTwhJ7If7zN30 Ug== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s46tthfsb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jul 2023 17:02:54 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36SH2sYF022283 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jul 2023 17:02:54 GMT Received: from jesszhan-linux.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Fri, 28 Jul 2023 10:02:53 -0700 From: Jessica Zhang Date: Fri, 28 Jul 2023 10:02:13 -0700 Subject: [PATCH RFC v5 04/10] drm/atomic: Add pixel source to plane state dump MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20230728-solid-fill-v5-4-053dbefa909c@quicinc.com> References: <20230728-solid-fill-v5-0-053dbefa909c@quicinc.com> In-Reply-To: <20230728-solid-fill-v5-0-053dbefa909c@quicinc.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Dmitry Baryshkov , "Sean Paul" , Marijn Suijten CC: , , , , , , , , , , , Jessica Zhang X-Mailer: b4 0.13-dev-034f2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690563772; l=2429; i=quic_jesszhan@quicinc.com; s=20230329; h=from:subject:message-id; bh=kGhbjh2hOvdJWzZhpe7DOggO0n8idJvRqZDJ1Lh0Zuw=; b=ApMc/RU/MZptypVQ+4DdSth4MxLFmXdI213LXW026znsCHWcJgDti7M6wRMT+L6UHaKungKdO g6W+y1OSH2wBV4fhVfKKb93ChZA6i0cIAgim6RzY+YELe0ucmmZ2yRp X-Developer-Key: i=quic_jesszhan@quicinc.com; a=ed25519; pk=gAUCgHZ6wTJOzQa3U0GfeCDH7iZLlqIEPo4rrjfDpWE= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: kbgLRalVmo-k5WEnO4Kwx_iHL0jUW1hN X-Proofpoint-GUID: kbgLRalVmo-k5WEnO4Kwx_iHL0jUW1hN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-27_10,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=538 lowpriorityscore=0 adultscore=0 spamscore=0 malwarescore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307280154 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_FILL_THIS_FORM_SHORT,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Add pixel source to the atomic plane state dump Signed-off-by: Jessica Zhang --- drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_crtc_internal.h | 2 ++ drivers/gpu/drm/drm_plane.c | 12 ++++++++++++ 3 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index b4c6ffc438da..c38014abc590 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -713,6 +713,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p, drm_printf(p, "plane[%u]: %s\n", plane->base.id, plane->name); drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)"); + drm_printf(p, "\tpixel-source=%s\n", drm_plane_get_pixel_source_name(state->pixel_source)); drm_printf(p, "\tfb=%u\n", state->fb ? state->fb->base.id : 0); if (state->fb) drm_framebuffer_print_info(p, 2, state->fb); diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 501a10edd0e1..75b59ec9f1be 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -38,6 +38,7 @@ enum drm_color_encoding; enum drm_color_range; enum drm_connector_force; enum drm_mode_status; +enum drm_plane_pixel_source; struct drm_atomic_state; struct drm_bridge; @@ -267,6 +268,7 @@ int drm_plane_check_pixel_format(struct drm_plane *plane, u32 format, u64 modifier); struct drm_mode_rect * __drm_plane_get_damage_clips(const struct drm_plane_state *state); +const char *drm_plane_get_pixel_source_name(enum drm_plane_pixel_source pixel_source); /* drm_bridge.c */ void drm_bridge_detach(struct drm_bridge *bridge); diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index f342cf15412b..4188b3491625 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -1487,6 +1487,18 @@ __drm_plane_get_damage_clips(const struct drm_plane_state *state) state->fb_damage_clips->data : NULL); } +const char *drm_plane_get_pixel_source_name(enum drm_plane_pixel_source pixel_source) +{ + switch(pixel_source) { + case DRM_PLANE_PIXEL_SOURCE_NONE: + return "NONE"; + case DRM_PLANE_PIXEL_SOURCE_FB: + return "fb"; + default: + return ""; + } +} + /** * drm_plane_get_damage_clips - Returns damage clips. * @state: Plane state. -- 2.41.0