From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C924BCCA473 for ; Fri, 24 Jun 2022 23:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231927AbiFXX4y (ORCPT ); Fri, 24 Jun 2022 19:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbiFXX4x (ORCPT ); Fri, 24 Jun 2022 19:56:53 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6E428BEDC; Fri, 24 Jun 2022 16:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656115013; x=1687651013; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ce8+3ivRZLrF1oiBN5WLS8F06pigi2WinsNpYBazKPI=; b=D/8sb8LgMl5fWx1gdO3Ck+zToNmBTFrhRnlfQPYRr4OONOFO/N16v8no BY3u+hOgkMtLJL1PAyztS+YhluFZnonfrFkFnVMUVCtnZfAOEMkh32Sdf UJUs3I/rGcn8azGjjgJJ8ahOOyIpjOR4TcPafdMSiGWG5BXKf6yQXsrl+ Q=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 24 Jun 2022 16:56:52 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2022 16:56:36 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 24 Jun 2022 16:56:36 -0700 Received: from [10.110.58.84] (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.986.22; Fri, 24 Jun 2022 16:56:35 -0700 Message-ID: <66ff4642-f268-f5b0-7e28-b196368c508a@quicinc.com> Date: Fri, 24 Jun 2022 16:56:34 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v1 2/3] drm/msm/dp: decoupling dp->id out of dp controller_id at scxxxx_dp_cfg table Content-Language: en-US To: Stephen Boyd , , , , , , , , , , CC: , , , , , References: <1656090912-18074-1-git-send-email-quic_khsieh@quicinc.com> <1656090912-18074-3-git-send-email-quic_khsieh@quicinc.com> <007ea4c9-9701-f4ab-3278-5d36bf2018c4@quicinc.com> <326912ff-9771-0711-366d-79acd436908b@quicinc.com> <0ff3d6a3-dc5c-7c77-f8a1-6c4f6c1a3215@quicinc.com> From: Kuogee Hsieh 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: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 6/24/2022 4:45 PM, Stephen Boyd wrote: > Quoting Kuogee Hsieh (2022-06-24 16:30:59) >> On 6/24/2022 4:12 PM, Stephen Boyd wrote: >>> Quoting Kuogee Hsieh (2022-06-24 15:53:45) >>>> MSM_DP_CONTROLLER_1 need to match to the index = 1 of sc7280_dp_cfg[] <== This is correct >>>> >>>> The problem is sc7280_dp_cfg[] have two entries since eDP place at index >>>> of MSM_DP_CONTROLLER_1. >>>> >>>> but .num_desc = 1  <== this said only have one entry at sc7280_dp_cfg[] >>>> table. Therefore eDP will never be found at for loop  at >>>> _dpu_kms_initialize_displayport(). >>>> >>> Yes, but what else does the MSM_DP_CONTROLLER_1 need to match? Because >>> the intention of the previous commit was to make it so the order of >>> sc7280_dp_cfg couldn't be messed up and not match the >>> MSM_DP_CONTROLLER_1 value that lives in sc7280_intf[]. >> >> at  _dpu_kms_initialize_displayport() >> >>> - info.h_tile_instance[0] = i; <== assign i to become dp controller id, "i" is index of scxxxx_dp_cfg[] >> This what I mean MSM_DP_CONTROLLER_1 need to match to index = 1 of >> scxxxx_dp_cfg[]. >> >> it it is not match, then MSM_DP_CONTROLLER_1 with match to different INTF. > I thought we matched the INTF instance by searching through > sc7280_intf[] for a matching MSM_DP_CONTROLLER_1 and then returning that > INTF number. See dpu_encoder_get_intf() and the caller. yes, but the controller_id had been over written by dp->id. u32 controller_id = disp_info->h_tile_instance[i]; See below code. > for (i = 0; i < disp_info->num_of_h_tiles && !ret; i++) { > /* > * Left-most tile is at index 0, content is controller id > * h_tile_instance_ids[2] = {0, 1}; DSI0 = left, DSI1 = right > * h_tile_instance_ids[2] = {1, 0}; DSI1 = left, DSI0 = right > */ > u32 controller_id = disp_info->h_tile_instance[i]; <== kuogee assign dp->id to controller_id > > if (disp_info->num_of_h_tiles > 1) { > if (i == 0) > phys_params.split_role = ENC_ROLE_MASTER; > else > phys_params.split_role = ENC_ROLE_SLAVE; > } else { > phys_params.split_role = ENC_ROLE_SOLO; > } > > DPU_DEBUG("h_tile_instance %d = %d, split_role %d\n", > i, controller_id, phys_params.split_role); > > phys_params.intf_idx = dpu_encoder_get_intf(dpu_kms->catalog, > > intf_type, > > controller_id); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0048C43334 for ; Fri, 24 Jun 2022 23:56:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E627610E78C; Fri, 24 Jun 2022 23:56:53 +0000 (UTC) Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id E485810E78C; Fri, 24 Jun 2022 23:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656115013; x=1687651013; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ce8+3ivRZLrF1oiBN5WLS8F06pigi2WinsNpYBazKPI=; b=D/8sb8LgMl5fWx1gdO3Ck+zToNmBTFrhRnlfQPYRr4OONOFO/N16v8no BY3u+hOgkMtLJL1PAyztS+YhluFZnonfrFkFnVMUVCtnZfAOEMkh32Sdf UJUs3I/rGcn8azGjjgJJ8ahOOyIpjOR4TcPafdMSiGWG5BXKf6yQXsrl+ Q=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 24 Jun 2022 16:56:52 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2022 16:56:36 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 24 Jun 2022 16:56:36 -0700 Received: from [10.110.58.84] (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.986.22; Fri, 24 Jun 2022 16:56:35 -0700 Message-ID: <66ff4642-f268-f5b0-7e28-b196368c508a@quicinc.com> Date: Fri, 24 Jun 2022 16:56:34 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v1 2/3] drm/msm/dp: decoupling dp->id out of dp controller_id at scxxxx_dp_cfg table Content-Language: en-US To: Stephen Boyd , , , , , , , , , , References: <1656090912-18074-1-git-send-email-quic_khsieh@quicinc.com> <1656090912-18074-3-git-send-email-quic_khsieh@quicinc.com> <007ea4c9-9701-f4ab-3278-5d36bf2018c4@quicinc.com> <326912ff-9771-0711-366d-79acd436908b@quicinc.com> <0ff3d6a3-dc5c-7c77-f8a1-6c4f6c1a3215@quicinc.com> From: Kuogee Hsieh 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: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_sbillaka@quicinc.com, linux-arm-msm@vger.kernel.org, quic_abhinavk@quicinc.com, linux-kernel@vger.kernel.org, quic_aravindh@quicinc.com, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 6/24/2022 4:45 PM, Stephen Boyd wrote: > Quoting Kuogee Hsieh (2022-06-24 16:30:59) >> On 6/24/2022 4:12 PM, Stephen Boyd wrote: >>> Quoting Kuogee Hsieh (2022-06-24 15:53:45) >>>> MSM_DP_CONTROLLER_1 need to match to the index = 1 of sc7280_dp_cfg[] <== This is correct >>>> >>>> The problem is sc7280_dp_cfg[] have two entries since eDP place at index >>>> of MSM_DP_CONTROLLER_1. >>>> >>>> but .num_desc = 1  <== this said only have one entry at sc7280_dp_cfg[] >>>> table. Therefore eDP will never be found at for loop  at >>>> _dpu_kms_initialize_displayport(). >>>> >>> Yes, but what else does the MSM_DP_CONTROLLER_1 need to match? Because >>> the intention of the previous commit was to make it so the order of >>> sc7280_dp_cfg couldn't be messed up and not match the >>> MSM_DP_CONTROLLER_1 value that lives in sc7280_intf[]. >> >> at  _dpu_kms_initialize_displayport() >> >>> - info.h_tile_instance[0] = i; <== assign i to become dp controller id, "i" is index of scxxxx_dp_cfg[] >> This what I mean MSM_DP_CONTROLLER_1 need to match to index = 1 of >> scxxxx_dp_cfg[]. >> >> it it is not match, then MSM_DP_CONTROLLER_1 with match to different INTF. > I thought we matched the INTF instance by searching through > sc7280_intf[] for a matching MSM_DP_CONTROLLER_1 and then returning that > INTF number. See dpu_encoder_get_intf() and the caller. yes, but the controller_id had been over written by dp->id. u32 controller_id = disp_info->h_tile_instance[i]; See below code. > for (i = 0; i < disp_info->num_of_h_tiles && !ret; i++) { > /* > * Left-most tile is at index 0, content is controller id > * h_tile_instance_ids[2] = {0, 1}; DSI0 = left, DSI1 = right > * h_tile_instance_ids[2] = {1, 0}; DSI1 = left, DSI0 = right > */ > u32 controller_id = disp_info->h_tile_instance[i]; <== kuogee assign dp->id to controller_id > > if (disp_info->num_of_h_tiles > 1) { > if (i == 0) > phys_params.split_role = ENC_ROLE_MASTER; > else > phys_params.split_role = ENC_ROLE_SLAVE; > } else { > phys_params.split_role = ENC_ROLE_SOLO; > } > > DPU_DEBUG("h_tile_instance %d = %d, split_role %d\n", > i, controller_id, phys_params.split_role); > > phys_params.intf_idx = dpu_encoder_get_intf(dpu_kms->catalog, > > intf_type, > > controller_id);