Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3329381rwb; Mon, 7 Aug 2023 11:39:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0QGxOiKSRd4m8SKTznkzoK4asgJuJhUB6I39/Uv5PxCVw9eprLJzfnTWO5mYsT0DREjCT X-Received: by 2002:a17:902:988d:b0:1b9:e23a:f761 with SMTP id s13-20020a170902988d00b001b9e23af761mr9968081plp.63.1691433556283; Mon, 07 Aug 2023 11:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691433556; cv=none; d=google.com; s=arc-20160816; b=y8I7QeWM3s0Wz50TWtknbSM4I7Kq+DEEpsoOI/K6cWoPE4J3K6lqp2RH7M1LygjtKW JFzzSVX7kJijIwzoJDGTiXpG9eHD3DSQ/POs4dQFGQzTIC5QdtiSj1iCyXC3+l9obDUd m3MCzClMte/JDrQ5IrS0r3R09yN7gVTcb1X6Tze6p9Enm1lpSsq62j9YRbfl4P+4E6X5 jPsKMesIBcK7DioUNOCkVpFdVK6DQqxJ4OrNfUqoNvtPf7j5nUhUTNAX+bWm0ay3i9if fJTDjYEn5eHW3GyXapRp+3/GB65Mt0iVPTbT7Gal+RGpoYL+TESRZohZgHOR68Lm9CXK RgpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=pEmL8EA32jpYep6/aDPvNMia/cr4WbfitZtWhJkKZXY=; fh=+AUzojpHLUT7o4Lq5ktDYJb/Hmt7l2vYEzWXtf4c77I=; b=CW8oI85wP07J6+pMRAIc9VwotyeTswO7/nAqD0jolxmrb7s+CiVQ5YFnG6yG+5VojZ yCrCvsyT2kohziP6gb7lhieLFRJts3lkC1nDU5CE99fUBO47MawvYekOcOuhywQAzl4l QzybJR621ugGZqL6GMuVO368/QejlXn/KRnWaXWOe+xJd2m6h/RHJAEqKPjWkiaK7Wp2 mLbi+VBTr0aotYe6OP4zz4I3M6fK791E9TPQAAv05pUbkIoHvh9yS0G2iUGOUSy1/e+U sh/q0sOs66aZ87CUdp5WXVepIlLaCVOQ4o2/lXL2jgCb/ZlXpcJZg/8L/ikOQfgGK9pG lqrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=K6Ucd77N; 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 m9-20020a170902bb8900b001bc7d730accsi202778pls.382.2023.08.07.11.39.03; Mon, 07 Aug 2023 11:39:16 -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=K6Ucd77N; 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 S231916AbjHGQkH (ORCPT + 99 others); Mon, 7 Aug 2023 12:40:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbjHGQju (ORCPT ); Mon, 7 Aug 2023 12:39:50 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2396D10CF; Mon, 7 Aug 2023 09:39:29 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 377FApLo031331; Mon, 7 Aug 2023 16:39:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=pEmL8EA32jpYep6/aDPvNMia/cr4WbfitZtWhJkKZXY=; b=K6Ucd77N/E2gGeYt3OxZX6FFqF17iR90gdwUlC1vtG23Sh4M89hKJKGxyvFarEH+TdW6 Z9Ts1FqfcbuJrl8c0/44/VeCezB6rZIyPF1dt3Kwt72vgi6adqvQYYinIFh3BlkLiLRf N/sYRg2f6DqSTnzZ736ncXoKov+3RkCrIRHksTiuMYstXCormt8nokr5R2AJMtf/+0qa YwFgUvEaCtu2xXcMy4RLm9RQ1KEBLJEA7qumcuXQUjhBqfUd1xTfFihCRi71ISZES6PG GL1P8XzzmqSTZxtJRA1PYhCLNe5zQkqS4aLYVESqMYgXi+G2WIL7i2MWZp24aA6T36Ne Wg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s9deem0vr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 16:39:03 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 377Gd26B028311 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 7 Aug 2023 16:39:02 GMT Received: from [10.71.109.168] (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; Mon, 7 Aug 2023 09:39:01 -0700 Message-ID: Date: Mon, 7 Aug 2023 09:39:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v5 04/10] drm/atomic: Add pixel source to plane state dump Content-Language: en-US To: Dmitry Baryshkov , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Sean Paul , Marijn Suijten CC: , , , , , , , , , , References: <20230728-solid-fill-v5-0-053dbefa909c@quicinc.com> <20230728-solid-fill-v5-4-053dbefa909c@quicinc.com> From: Jessica Zhang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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-GUID: qSiixsqYXp7fJuFONrzsE-9mYXfv1nE4 X-Proofpoint-ORIG-GUID: qSiixsqYXp7fJuFONrzsE-9mYXfv1nE4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-07_17,2023-08-03_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 malwarescore=0 impostorscore=0 spamscore=0 clxscore=1015 mlxlogscore=787 mlxscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308070153 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_BLOCKED, SPF_HELO_NONE,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 On 7/28/2023 5:04 PM, Dmitry Baryshkov wrote: > On 28/07/2023 20:02, Jessica Zhang wrote: >> 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 ""; >> +    } >> +} > > Please use DRM_ENUM_NAME_FN instead. Hi Dmitry, Acked. Thanks, Jessica Zhang > >> + >>   /** >>    * drm_plane_get_damage_clips - Returns damage clips. >>    * @state: Plane state. >> > > -- > With best wishes > Dmitry >