Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5585591rdb; Wed, 13 Dec 2023 13:05:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW5yw/pQv8kGAgqo3edosQ9ics0ItmgP1k8KsdQmnorwIWUwhySFJd1wE/pxbVn1uqjNGw X-Received: by 2002:a17:903:32c5:b0:1d3:6419:ca60 with SMTP id i5-20020a17090332c500b001d36419ca60mr331658plr.92.1702501513032; Wed, 13 Dec 2023 13:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702501513; cv=none; d=google.com; s=arc-20160816; b=fkWpI982Z/YyGdBdRQOwe5YMt/7pyXWg4b7Nd+JasBRTiFRk4ds6ls2YaXy9wzwq9A WOKgcMxkBqZTwBApJ1XMvaL7/6H8ZVK0MEYkx0mjSKHq+FFjbLvp80z7QwV7Oq6UNScy 0jtidCus1ds8Ne77f+igCdGL0VtE13ctfhdvZC71dR9oXF8JZLT7J6j1IqpurIXzQnmA 2c1cTwI2FwF0jQPBEK+omjOUVOX784paUnhp6+DB7Ni/94MTdgfhlUzvBeNVK9N/j9nE e7W02RLUjGvMPRNoUa67ZyIxRIkdsdwMkVNRK+4L8VQ/rM4OHOfD0fhqW97XrIgmzL1h Mm9A== 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=ihpYFWWnterI/M7n6N8lxFYsutBZIy9xyS15gKnimk4=; fh=gTApskvwgd2OIYE7rKMamJvJHpKQIWv7osJsll4ZDEM=; b=ZtxtOWbN7nR8IP7QFN9K8EmylmJxXJsx7/VRxhtIJWVmNUAN1i2KwuH9nC1ZITNPrL PItP6dbzXyfLWV68wrMt3kFclOuQ3/WjJSq0MobkwSixpowx2Of/+dWatSSJUUv/Krs2 9lAu9lhx/tec2EfqaCZhyDQViK2xpge8xJSQNVLMb3vNspdRfFx6f3nLpyLaWZoNHa/q 9y9UoREXRFnDO55U5UwD9cxIHtPSHOx5SgdbBQUMgn5o+2zBsYc0M//XxkB4eNH1H4nN OAQ1cj5JjAUbzvmpaeeuJ1GIHPaLowv+5NN8BVYMITmW4uhjFM5lwCoU7clFjGhuFWXT 8KbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XsBtDFUy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id x24-20020a170902b41800b001d09c96ba0fsi9973200plr.421.2023.12.13.13.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 13:05:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XsBtDFUy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CC84B8031D57; Wed, 13 Dec 2023 13:05:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234186AbjLMVEx (ORCPT + 99 others); Wed, 13 Dec 2023 16:04:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234206AbjLMVEr (ORCPT ); Wed, 13 Dec 2023 16:04:47 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72DB1113; Wed, 13 Dec 2023 13:04:53 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BDKalVI028033; Wed, 13 Dec 2023 21:04:47 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=ihpYFWWnterI/M7n6N8lxFYsutBZIy9xyS15gKnimk4=; b=Xs BtDFUy4K4/9RWn93c9zZtV2xSiDP17Zoa7YnD+lKSbGfK9H1qRdXyXRlhkAbp5p5 BwxzsBSCV7TdCVXbBUb0if3xWpaZYYp7jK54S8E9ZSzTr1IO9PEJJXLswKB79Jmg dsDxJ5pfJfjWme/++is2+yDckxj3SaA+f/Vv529QwgyWMuoZK+O0FdAfYJLaFfuT Jsz/OlOkU63A+/DteQYC9RLnYe8LG97HBJE8FI1BZUdqaJ22qYPBjKqOz5hGBt6H /cTzLgyOJf2Y8eKVcR4qZD0c/3EPBRBVDLPhtcJ184GoM3PxIvopFRJasWMF5qv6 dlZ7WMG8H2RHh6Hqdbzw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uy4dhjdt7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 21:04:46 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BDL4apE007824 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 21:04:36 GMT Received: from [10.71.109.77] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 13 Dec 2023 13:04:36 -0800 Message-ID: <1505c454-aaeb-bc80-7e1e-c0b2e1aa1197@quicinc.com> Date: Wed, 13 Dec 2023 13:04:35 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 1/2] drm/msm/dpu: Set input_sel bit for INTF Content-Language: en-US To: Jessica Zhang , Rob Clark , Dmitry Baryshkov , "Sean Paul" , Marijn Suijten , "David Airlie" , Daniel Vetter CC: , , , References: <20231213-encoder-fixup-v2-0-b11a4ad35e5e@quicinc.com> <20231213-encoder-fixup-v2-1-b11a4ad35e5e@quicinc.com> From: Abhinav Kumar In-Reply-To: <20231213-encoder-fixup-v2-1-b11a4ad35e5e@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 3oj3WGXAvEMGL8Uy7hAIQgKCDjvtCn6x X-Proofpoint-GUID: 3oj3WGXAvEMGL8Uy7hAIQgKCDjvtCn6x X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 priorityscore=1501 spamscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312130149 X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 13 Dec 2023 13:05:10 -0800 (PST) On 12/13/2023 12:51 PM, Jessica Zhang wrote: > Set the input_sel bit for encoders as it was missed in the initial > implementation. > > Reported-by: Rob Clark > Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/39 > Fixes: 91143873a05d ("drm/msm/dpu: Add MISR register support for interface") > Signed-off-by: Jessica Zhang > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 10 ++++++++-- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 3 ++- > 4 files changed, 12 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c > index 0b6a0a7dcc39..226133af7840 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c > @@ -322,7 +322,7 @@ static u32 dpu_hw_intf_get_line_count(struct dpu_hw_intf *intf) > > static void dpu_hw_intf_setup_misr(struct dpu_hw_intf *intf, bool enable, u32 frame_count) > { > - dpu_hw_setup_misr(&intf->hw, INTF_MISR_CTRL, enable, frame_count); > + dpu_hw_setup_misr(&intf->hw, INTF_MISR_CTRL, enable, frame_count, 0x1); > } > > static int dpu_hw_intf_collect_misr(struct dpu_hw_intf *intf, u32 *misr_value) > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c > index 25af52ab602f..bbc9756ecde9 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c > @@ -85,7 +85,7 @@ static void dpu_hw_lm_setup_border_color(struct dpu_hw_mixer *ctx, > > static void dpu_hw_lm_setup_misr(struct dpu_hw_mixer *ctx, bool enable, u32 frame_count) > { > - dpu_hw_setup_misr(&ctx->hw, LM_MISR_CTRL, enable, frame_count); > + dpu_hw_setup_misr(&ctx->hw, LM_MISR_CTRL, enable, frame_count, 0x0); > } > > static int dpu_hw_lm_collect_misr(struct dpu_hw_mixer *ctx, u32 *misr_value) > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c > index 0b05061e3e62..87716a60332e 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c > @@ -477,7 +477,8 @@ void _dpu_hw_setup_qos_lut(struct dpu_hw_blk_reg_map *c, u32 offset, > > void dpu_hw_setup_misr(struct dpu_hw_blk_reg_map *c, > u32 misr_ctrl_offset, > - bool enable, u32 frame_count) > + bool enable, u32 frame_count, > + u32 input_sel) > { > u32 config = 0; > > @@ -487,8 +488,13 @@ void dpu_hw_setup_misr(struct dpu_hw_blk_reg_map *c, > wmb(); > > if (enable) { > + /* > + * note: Aside from encoders, input_sel should be > + * set to 0x0 by default > + */ > config = (frame_count & MISR_FRAME_COUNT_MASK) | > - MISR_CTRL_ENABLE | MISR_CTRL_FREE_RUN_MASK; > + MISR_CTRL_ENABLE | MISR_CTRL_FREE_RUN_MASK | > + ((input_sel & 0xF) << 24); > > DPU_REG_WRITE(c, misr_ctrl_offset, config); > } else { > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h > index fe083b2e5696..761056be272b 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h > @@ -357,7 +357,8 @@ void _dpu_hw_setup_qos_lut(struct dpu_hw_blk_reg_map *c, u32 offset, > void dpu_hw_setup_misr(struct dpu_hw_blk_reg_map *c, > u32 misr_ctrl_offset, > bool enable, > - u32 frame_count); > + u32 frame_count, > + u32 input_sel); u8 for input_sel? > > int dpu_hw_collect_misr(struct dpu_hw_blk_reg_map *c, > u32 misr_ctrl_offset, >