From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84B3B198A30; Fri, 11 Oct 2024 16:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728665562; cv=none; b=QytNLLqWoCWsc79MXo05xPUXEeaQrL/inzEFiSoWwpSTt175Y7dZIDiBHbOiKHP0b5kMRJNd9BRcY0piXScS5+JGbemsxcFReoiEJsHtQObS2Wq/yB53FH/wbM8ts1OdGBfODxmVR1VSoftNWQlLsP1Xx4vd2KyuzsOk9Bumt+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728665562; c=relaxed/simple; bh=NLWTkqQBlZ5fQp6FKts9KKvEidNRUHCfy8wl2aWXoA4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=XdatjeNiMo2t521xLRWtvJa2PqGOgZjZGIpQMTygv/xY68Sboc/RUCQhaG5CHjH7KGe1e4hry7nONLaJqpCQkh7ltMyK5w7BSns/m/+xUn17lyvyGLX3JuxBctUnuwR0AFk1oSqFbCLmzFH5vXvGvwNzKy+jS2MkUSPigd6sRmM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=fg5ssYzW; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fg5ssYzW" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49BD5qBM027261; Fri, 11 Oct 2024 16:52:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= YdTapo4S6feBiVPiCSeV3MciWWfF9x6DOTd25x31i+s=; b=fg5ssYzWNdH+cHD5 pkp2DBrsWsxvN2BeVmJ7u4gPHF1XcnVeJHvQqsyRWojdGvn0aoovt34wr1hIf84/ YlhhUWpTU5S1Ka4xHVVt/VXeBByE5KcQowkfYcO6hIyZSMAiwbE37dmrvTa9P2x+ 28Z1XJYZlMPddlOBmIxg1bCfAQpDZX1Fryerdebl6a9gwl+gLEmTkbZqep/qBvHV ADP9JVmp5CtjsPqQXsfIHz9YC1eJU0E42PxZHJIreogpVnnrsMZgbPCPWAKKW59d +TdgWeJQjTwii6R/IuLxiexvhKT3+tu7+TU8gH0W5OQuU8aOC1BF57GQ0mh262n3 nioJ0A== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 426fj6v1kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 16:52:31 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49BGqUVo031421 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 16:52:30 GMT Received: from [10.110.78.155] (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.1544.9; Fri, 11 Oct 2024 09:52:29 -0700 Message-ID: <6d67c2c6-819b-481a-8cc9-e24ef8f6c142@quicinc.com> Date: Fri, 11 Oct 2024 09:52:19 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] drm/panel: samsung-s6e88a0-ams427ap24: Add initial driver To: Jakob Hauser , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , <~postmarketos/upstreaming@lists.sr.ht> References: Content-Language: en-US From: Jessica Zhang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: Ycvy_0ng3J6UYrpz85-OCgtoylUA1SbQ X-Proofpoint-ORIG-GUID: Ycvy_0ng3J6UYrpz85-OCgtoylUA1SbQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1011 mlxscore=0 impostorscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410110117 On 10/10/2024 11:31 AM, Jakob Hauser wrote: > This initial part of the panel driver was mostly generated by the > "linux-mdss-dsi-panel-driver-generator" tool [1], reading downstream > Android kernel file "dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi" [2]. > > On top of the generic output of the tool, there were a couple of changes > applied: > - Added mipi_dsi_dcs_set_display_on() to function s6e88a0_ams427ap24_on(), > otherwise the display does not show up. > - In functions s6e88a0_ams427ap24_on() and s6e88a0_ams427ap24_off() > changed DSI commands to multi context and used "accum_err" returns. > - In functions s6e88a0_ams427ap24_on() and s6e88a0_ams427ap24_off() replaced > msleep() by mipi_dsi_msleep(). > - The function s6e88a0_ams427ap24_get_modes() was changed to make use of > drm_connector_helper_get_modes_fixed(). This also required to include > drm/drm_probe_helper.h. > - In function s6e88a0_ams427ap24_probe() registring the regulators was changed > to devm_regulator_bulk_get_const(). This required to change supplies in struct > s6e88a0_ams427ap24 to a pointer. > > Coulnd't read out RAW EDID, /sys/class/drm/card0-DSI-1/edid is empty. > > [1] https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator > [2] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi > > Signed-off-by: Jakob Hauser > --- > drivers/gpu/drm/panel/Kconfig | 9 + > drivers/gpu/drm/panel/Makefile | 1 + > .../panel/panel-samsung-s6e88a0-ams427ap24.c | 261 ++++++++++++++++++ > 3 files changed, 271 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index ddfaa99ea9dd..fa6a8c6cac5b 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -623,6 +623,15 @@ config DRM_PANEL_SAMSUNG_AMS639RQ08 > Say Y or M here if you want to enable support for the > Samsung AMS639RQ08 FHD Plus (2340x1080@60Hz) CMD mode panel. > > +config DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24 > + tristate "Samsung AMS427AP24 panel with S6E88A0 controller" > + depends on GPIOLIB && OF && REGULATOR > + depends on DRM_MIPI_DSI > + help > + Say Y here if you want to enable support for Samsung AMS427AP24 panel > + with S6E88A0 controller (found in Samsung Galaxy S4 Mini Value Edition > + GT-I9195I). To compile this driver as a module, choose M here. > + > config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 > tristate "Samsung AMS452EF01 panel with S6E88A0 DSI video mode controller" > depends on OF > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index 4b5eaf111676..3002087c26d1 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -76,6 +76,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_SPI) += panel-samsung-s6e63m0-spi.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI) += panel-samsung-s6e63m0-dsi.o > +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24) += panel-samsung-s6e88a0-ams427ap24.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) += panel-samsung-s6e88a0-ams452ef01.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF00) += panel-samsung-sofef00.o > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c > new file mode 100644 > index 000000000000..182ba8c347e2 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c > @@ -0,0 +1,261 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Samsung AMS427AP24 panel with S6E88A0 controller > + * Copyright (c) 2024 Jakob Hauser > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include