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 E7AEDC7EE23 for ; Wed, 1 Mar 2023 08:13:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229747AbjCAINk (ORCPT ); Wed, 1 Mar 2023 03:13:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjCAINi (ORCPT ); Wed, 1 Mar 2023 03:13:38 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1C2A44B8; Wed, 1 Mar 2023 00:13:36 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3213RR9e021906; Wed, 1 Mar 2023 08:13:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=qcppdkim1; bh=BRHFoWIj+8F0fcbTP5Rvc6mNgEWgB8Dk9Uhh3agYKng=; b=Sk3Vnlfcn6zaNzjschDA/RfuN8CSAXHA5YewB0NaXAYbnvfhDAVFCpSOmK1/MynLArPu OuLJRZq6nuEot0r58LW1t/9RHPsj7w4CSnT/iv/uHnZZBI2QxZAAM95H75apc+vPyRur d4lgXgmrtoTXY0sjeBBxUPVqWW8Begwti0F5Rd6xHMZeMrhiXuzh15v3XLVubpA27j2P rWpfAW+FNLMqMkI/u0y6A27UmmD7WZrPu7fdC76Le+x18gCAqc3d6fwupwU151Diq8qh bG7Iuom03JHtx/6iJvqM7w/Cj9JU7/sKJdMgTIthkQpRURdyhM7wazIzxSOVP/9+5cH2 aQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p1n0tj54t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Mar 2023 08:13:32 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3218DVcG011208 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Mar 2023 08:13:31 GMT Received: from nalasex01a.na.qualcomm.com (10.47.209.196) 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.41; Wed, 1 Mar 2023 00:13:30 -0800 Received: from nalasex01a.na.qualcomm.com ([fe80::96c7:affa:94e1:ece3]) by nalasex01a.na.qualcomm.com ([fe80::96c7:affa:94e1:ece3%4]) with mapi id 15.02.0986.041; Wed, 1 Mar 2023 00:13:30 -0800 From: "Sankeerth Billakanti (QUIC)" To: "dmitry.baryshkov@linaro.org" CC: "dri-devel@lists.freedesktop.org" , "linux-arm-msm@vger.kernel.org" , "freedreno@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "robdclark@gmail.com" , "seanpaul@chromium.org" , "swboyd@chromium.org" , "Kalyan Thota (QUIC)" , "Abhinav Kumar (QUIC)" , "dianders@chromium.org" , "Kuogee Hsieh (QUIC)" , "Bjorn Andersson (QUIC)" , "sean@poorly.run" , "airlied@linux.ie" , "daniel@ffwll.ch" , "Vishnuvardhan Prodduturi (QUIC)" Subject: RE: [RFC PATCH 1/2] drm/msm/dp: enumerate edp panel during driver probe Thread-Topic: [RFC PATCH 1/2] drm/msm/dp: enumerate edp panel during driver probe Thread-Index: AQHZR467FssNTZzZyEK1D3A6Ue8YH67dJcgAgAhN8vA= Date: Wed, 1 Mar 2023 08:13:30 +0000 Message-ID: <72b9c34357a443df8cbb55c6eddd8a21@quicinc.com> References: <20230223135635.30659-1-quic_sbillaka@quicinc.com> <20230223135635.30659-2-quic_sbillaka@quicinc.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.216.29.118] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: ZTk6mXIPw_o_x7O7vIaNFf0jFLF7uwG3 X-Proofpoint-GUID: ZTk6mXIPw_o_x7O7vIaNFf0jFLF7uwG3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-01_04,2023-02-28_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 malwarescore=0 adultscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303010065 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pj4NCj4+IFRoZSBlRFAgcGFuZWwgaXMgaWRlbnRpZmllZCBhbmQgZW51bWVyYXRlZCBkdXJpbmcg cHJvYmUgb2YgdGhlDQo+PiBwYW5lbC1lZHAgZHJpdmVyLiBUaGUgY3VycmVudCBEUCBkcml2ZXIg dHJpZ2dlcnMgdGhpcyBwYW5lbC1lZHAgZHJpdmVyDQo+PiBwcm9iZSB3aGlsZSBnZXR0aW5nIHRo ZSBwYW5lbC1icmlkZ2UgY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190b19qaWZmaWVzKDI1MCkpOw0KPj4gLSAgICAgICBpZiAo IXRpbWVfbGVmdCkNCj4+IC0gICAgICAgICAgICAgICByZXR1cm4gLUVUSU1FRE9VVDsNCj4+ICsg ICAgICAgICAgICAgICBpZiAoIXRpbWVfbGVmdCkNCj4+ICsgICAgICAgICAgICAgICAgICAgICAg IHJldHVybiAtRVRJTUVET1VUOw0KPj4gKyAgICAgICB9IGVsc2Ugew0KPj4gKyAgICAgICAgICAg ICAgIHJldCA9IGRwX2NhdGFsb2dfYXV4X3BvbGxfYW5kX2dldF9od19pbnRlcnJ1cHQoYXV4LT5j YXRhbG9nKTsNCj4+ICsgICAgICAgICAgICAgICBpZiAoIXJldCkNCj4+ICsgICAgICAgICAgICAg ICAgICAgICAgIGRwX2F1eF9pc3IoJmF1eC0+ZHBfYXV4KTsNCj4+ICsgICAgICAgfQ0KPj4NCj4+ ICAgICAgICAgcmV0dXJuIHJldDsNCj4+ICB9DQo+PiBAQCAtMjM4LDcgKzI0NCw3IEBAIHN0YXRp YyB2b2lkDQo+ZHBfYXV4X3VwZGF0ZV9vZmZzZXRfYW5kX3NlZ21lbnQoc3RydWN0IGRwX2F1eF9w cml2YXRlICphdXgsDQo+PiAgICovDQo+PiAgc3RhdGljIHZvaWQgZHBfYXV4X3RyYW5zZmVyX2hl bHBlcihzdHJ1Y3QgZHBfYXV4X3ByaXZhdGUgKmF1eCwNCj4+ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGRybV9kcF9hdXhfbXNnICppbnB1dF9tc2csDQo+PiAtICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgc2VuZF9zZWcpDQo+PiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgc2VuZF9zZWcsIGJvb2wgcG9sbCkNCj4+ ICB7DQo+PiAgICAgICAgIHN0cnVjdCBkcm1fZHBfYXV4X21zZyBoZWxwZXJfbXNnOw0KPj4gICAg ICA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250Kys7DQo+PiArICAgICAgICAgICAg ICAgICAgICAgICBpZiAoIShhdXgtPnJldHJ5X2NudCAlIE1BWF9BVVhfUkVUUklFUykpDQo+PiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRwX2NhdGFsb2dfYXV4X3VwZGF0ZV9jZmco YXV4LT5jYXRhbG9nKTsNCj4+ICsgICAgICAgICAgICAgICB9DQo+PiArICAgICAgICAgICAgICAg LyogcmVzZXQgYXV4IGlmIGxpbmsgaXMgaW4gY29ubmVjdGVkIHN0YXRlICovDQo+PiArICAgICAg ICAgICAgICAgaWYgKGRwX2NhdGFsb2dfbGlua19pc19jb25uZWN0ZWQoYXV4LT5jYXRhbG9nKSkN Cj4+ICsgICAgICAgICAgICAgICAgICAgICAgIGRwX2NhdGFsb2dfYXV4X3Jlc2V0KGF1eC0+Y2F0 YWxvZyk7DQo+PiArICAgICAgIH0gZWxzZSB7DQo+PiArICAgICAgICAgICAgICAgYXV4LT5yZXRy eV9jbnQgPSAwOw0KPj4gKyAgICAgICAgICAgICAgIHN3aXRjaCAoYXV4LT5hdXhfZXJyb3JfbnVt KSB7DQo+PiArICAgICAgICAgICAgICAgY2FzZSBEUF9BVVhfRVJSX05PTkU6DQo+PiArICAgICAg ICAgICAgICAgICAgICAgICBpZiAoYXV4LT5yZWFkKQ0KPj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICByZXQgPSBkcF9hdXhfY21kX2ZpZm9fcngoYXV4LCBtc2cpOw0KPj4gKyAgICAg ICAgICAgICAgICAgICAgICAgbXNnLT5yZXBseSA9IGF1eC0+bmF0aXZlID8gRFBfQVVYX05BVElW RV9SRVBMWV9BQ0sgOg0KPkRQX0FVWF9JMkNfUkVQTFlfQUNLOw0KPj4gKyAgICAgICAgICAgICAg ICAgICAgICAgYnJlYWs7DQo+PiArICAgICAgICAgICAgICAgY2FzZSBEUF9BVVhfRVJSX0RFRkVS Og0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgbXNn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VuIHNodXQgZG93biB0aGUgcmVzb3VyY2VzDQo+YW5kIGJpbmQgdGhlIGNvbXBv bmVudC4NCj4NCg0KSSByZW1vdmVkIHRoZSByZXNvdXJjZSBlbmFibGluZyBwYXJ0IGZyb20gcHJv YmUgaW4gdGhlIG5leHQgcGF0Y2ggd2hlcmUgSSBpbXBsZW1lbnRlZCBwbV9ydW50aW1lX29wcy4N CkkgbW92ZWQgdGhlIGhvc3RfaW5pdCwgcGh5X2luaXQgYW5kIGhwZF9jb25maWcgaW50byBydW50 aW1lX3Jlc3VtZSBhbmQgY2FsbGluZyBwbV9ydW50aW1lX2dldF9zeW5jIGZyb20gYXV4X3RyYW5z ZmVyLg0KDQo+PiArDQo+PiArICAgICAgICAgICAgICAgZHBfZGlzcGxheV9ob3N0X3BoeV9leGl0 KGRwKTsNCj4+ICsgICAgICAgICAgICAgICBkcF9kaXNwbGF5X2hvc3RfZGVpbml0KGRwKTsNCj4+ ICsNCj4+ICsgICAgICAgICAgICAgICBpZiAocmMpIHsNCj4+ICsgICAgICAgICAgICAgICAgICAg ICAgIERSTV9FUlJPUigiZmFpbGVkIHRvIGluaXRpYWxpemUgcGFuZWwsIHJjID0gJWRcbiIsIHJj KTsNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZXJyb3I7DQo+PiArICAgICAgICAg ICAgICAgfQ0KPj4gKyAgICAgICB9DQo+PiArDQo+PiAgICAgICAgIHJjID0gY29tcG9uZW50X2Fk ZCgmcGRldi0+ZGV2LCAmZHBfZGlzcGxheV9jb21wX29wcyk7DQo+PiAgICAgICAgIGlmIChyYykg ew0KPj4gICAgICAgICAgICAgICAgIERSTV9FUlJPUigiY29tcG9uZW50IGFkZCBmYWlsZWQsIHJj PSVkXG4iLCByYyk7DQo+PiAgICAgICAgICAgICAgICAgZHBfZGlzcGxheV9kZWluaXRfc3ViX21v ZHVsZXMoZHApOw0KPj4gICAgICAgICB9DQo+Pg0KPj4gK2Vycm9yOg0KPj4gICAgICAg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pbmcNCj4+IC0gICAgICAgICAgICAgICAgKiBieSB0aGUgdGltZSBkZXZt X29mX2RwX2F1eF9wb3B1bGF0ZV9lcF9kZXZpY2VzKCkgcmV0dXJucy4NCj4+IC0gICAgICAgICAg ICAgICAgKiBUaGlzIGlzbid0IGEgZ3JlYXQgYXNzdW1wdGlvbiBzaW5jZSBpdCB3aWxsIGZhaWwg aWYgdGhlDQo+PiAtICAgICAgICAgICAgICAgICogcGFuZWwgZHJpdmVyIGlzIHByb2JlZCBhc3lu Y2hyb25vdXNseSBidXQgaXMgdGhlIGJlc3Qgd2UNCj4+IC0gICAgICAgICAgICAgICAgKiBjYW4g ZG8gd2l0aG91dCBhIGJpZ2dlciBkcml2ZXIgcmVvcmdhbml6YXRpb24uDQo+PiAtICAgICAgICAg ICAgICAgICovDQo+PiAtICAgICAgICAgICAgICAgcmMgPSBvZl9kcF9hdXhfcG9wdWxhdGVfYnVz KGRwX3ByaXYtPmF1eCwgTlVMTCk7DQo+PiAtICAgICAgICAgICAgICAgb2Zfbm9kZV9wdXQoYXV4 X2J1cyk7DQo+PiAtICAgICAgICAgICAgICAgaWYgKHJjKQ0KPj4gLSAgICAgICAgICAgICAgICAg ICAgICAgZ290byBlcnJvcjsNCj4+IC0NCj4+IC0gICAgICAgICAgICAgICByYyA9IGRldm1fYWRk X2FjdGlvbl9vcl9yZXNldChkcC0+ZHJtX2Rldi0+ZGV2LA0KPj4gLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2ZfZHBfYXV4X2RlcG9wdWxhdGVfYnVzX3Zv aWQsDQo+PiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBk cF9wcml2LT5hdXgpOw0KPj4gLSAgICAgICAgICAgICAgIGlmIChyYykNCj4+IC0gICAgICAgICAg ICAgICAgICAgICAgIGdvdG8gZXJyb3I7DQo+PiAtICAgICAgIH0gZWxzZSBpZiAoZHAtPmlzX2Vk cCkgew0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