From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A678233CA for ; Tue, 7 Jan 2025 08:54:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736240058; cv=none; b=p3bcxTnvvJrWGsr1X+Ga1f+2VuRe1IV6QM7ssf0ZB+XCp/+OScM+6tvef+39LNxCa9hEGuFA9ckvEzpDcX6ytfUrF3QXWmdkBuzdrjqfnK0VSbRxNDiBEGoQVGeOrKMIgyM7UqnSOEBt9KK+sVF8iyd/CMD1gvcl/X8Y8l5TMMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736240058; c=relaxed/simple; bh=stXG9Hyg4f4OHYc5UdPzp5EBHOIupJlamuzkoXCuNCo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kLtEzucG6cXtSV9za0MZeKqH9gd4pIjF/X3KFNywpdchNC1pEoE8iF5K7c1KSkgOzm+JLHMLkDjZfI2br9j9TQ+mDNGCmBpxnsost5AAckEeNdlxg4MtaOVRJwAqRuhS9E3OiDTtn3jNC9/9l193nsvvVmLAhAVaa2yvzaltGN8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c4QPQtMv; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c4QPQtMv" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-21619108a6bso206822855ad.3 for ; Tue, 07 Jan 2025 00:54:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736240056; x=1736844856; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=sYzLOLBD7SRiQdyP3FHTMuHYR+jXGJc6CWggQbGTPXo=; b=c4QPQtMvg3sp6l0xoHKz8HfbjrrVAn6KS2WcbJ+VNFFgBPLDCvdFiwT6PG0EoRgIVw Szox10bVDPy5vD9FdfGqlGxdqUhveIQwIQEzxWn0v46vqSdSAp/JpylEwVaRV8nafvY3 oUZQCTd4eaimAeKP5ugCR0oaH1PgPalb1H1qhbIJoqI5cBaQ9LBcMVvTjIc4gT1iU7VU Sa1459Re5lixRx3rMZnp5v8gVEdYbqkNsFIGhKNKSegNCfrcOgIdZQ9QHdlQ6IUshCoQ m5q1vxF79rTX23f2OBCBF42g7/APmzq3E1ZaXHcHA5ZLWvGGElOaZjEZ3MixIEzP7e7h 1SJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736240056; x=1736844856; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sYzLOLBD7SRiQdyP3FHTMuHYR+jXGJc6CWggQbGTPXo=; b=wqtFsMfIMrjbFdO6Imxx0Er7ryYJiE4Z7VVWyYxUK3o3lgDUhOeREKRQW2EOZYTFm1 5IOhj+v4YGbLMFoCImM2zZ93dcZsMAzPMUBu4tS9O3RBIikbTv6lpZfPiBJBSXZzdro/ 1Hpwb7NZEuIQeXRFZ/f+9ylL5AVR/JDKCjijDH4Cn0E3m6TLBIYTetGY/FxYPme1RDZZ 598C8wOENOvi/ehDH+kXyLG4cMSh8UGmRpHZNi1Ei1w3dqK/LHJPzuFveTTFr3t60hw2 riAT4pr16O3kNua//dkp9BpDjfjWAYoWwSmBr4QYa41o34cLqe8tvR73fLBekv/TO9xB mD7w== X-Forwarded-Encrypted: i=1; AJvYcCXZMKCFG5hf4Pbdxkdkaqn0z9gBkM0HNuFPwV+5RJXbGBfdboatTUEMqWY7PchdWnWOKcupUAbDG6I8ck4=@vger.kernel.org X-Gm-Message-State: AOJu0Yxq4vZO3PfjOTiHloQlGqVz4UMLhR02kV0iG3rOsPmsZ5hbT0lE 4yJteXlehaChmysso2Z5C1esnhxstB8kaAGwIyYNCTbvjGuhr7k7 X-Gm-Gg: ASbGncuZfPX8lKhviNIYSoyOo5pDTbFgiOdLuRJft+4ETfy/4bpBmMFtGvaHCYO+aCC 7K91xbSOMwNb7QLN9kdVC6rNe+4vLfGg0ZO+NBolPitFodzdBcb0+gCinPcfWn4QSWRWkbeVq5K FcMSx2qm+FWablBMRy9oK/j6UZfDoYLSQzbFiAnZMFlS8wGbjy0cILp5W/k6Xgc1DY4m14fTZbj vh4orid54u6EAiY03gZ6M7Nyr2WmFhcwEWE0Eg9vNZHRK3TxCBb06Lg/U5YKQ== X-Google-Smtp-Source: AGHT+IGrzpud2u8tqXeIx6WFYqVHRmSk1jmn5bqvNmqVDa5o7b3UdPxWswuHMvhF2AnFQPiAyzPDLw== X-Received: by 2002:a05:6a20:a127:b0:1e1:aa24:2e56 with SMTP id adf61e73a8af0-1e5e07ffd4bmr104670663637.30.1736240055792; Tue, 07 Jan 2025 00:54:15 -0800 (PST) Received: from [10.3.72.248] ([14.139.187.71]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8f90b9sm32769075b3a.131.2025.01.07.00.54.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2025 00:54:15 -0800 (PST) Message-ID: <1f1cdfdd-2765-49f2-b179-14b18bd49d67@gmail.com> Date: Tue, 7 Jan 2025 14:24:10 +0530 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] drm/panel: xinpeng-xpp055c272: transition to mipi_dsi wrapped functions To: Doug Anderson Cc: neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, quic_jesszhan@quicinc.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20241223052049.419831-1-tejasvipin76@gmail.com> <47738b2b-351b-4df9-a50a-f4dff51441c8@linaro.org> <70f0dbf2-dd84-4a50-94cc-1d388c5c93fe@gmail.com> Content-Language: en-US From: Tejas Vipin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/7/25 10:18 AM, Doug Anderson wrote: > Hi, > > On Mon, Jan 6, 2025 at 8:21 PM Tejas Vipin wrote: >> >>>>> - ret = xpp055c272_init_sequence(ctx); >>>>> - if (ret < 0) { >>>>> - dev_err(ctx->dev, "Panel init sequence failed: %d\n", ret); >>>>> - goto disable_iovcc; >>>>> - } >>>>> - >>>>> - ret = mipi_dsi_dcs_exit_sleep_mode(dsi); >>>>> - if (ret < 0) { >>>>> - dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret); >>>>> - goto disable_iovcc; >>>>> - } >>>>> + xpp055c272_init_sequence(&dsi_ctx); >>>>> + dev_dbg(ctx->dev, "Panel init sequence done\n"); >>> >>> Should the above print be only if "accum_err" is 0? That would match >>> the previous behavior. I guess I would have also left the print as >>> part of xpp055c272_init_sequence() unless there's a reason for moving >>> it... >> >> I don't think it should print only if accum_err is 0. In the previous >> code, it would just print after all the msleeps and write_seqs are done, >> with no error checking at any point. > > How sure are you about this? Remember the reason why we wanted to > deprecate mipi_dsi_dcs_write_seq()? All those dang hidden return > values. So if any one of the old mipi_dsi_dcs_write_seq() got an error > they would have had a non-obvious return out of the function, right? > So the print would have only happened if all of the commands executed > successfully... > > :-P Right yes. I'd kind of forgotten how mipi_dsi_dcs_write_seq worked. I'll fix it then along with the rest of the changes. > > >> The reason I've moved the print outside the function is because we are >> able to reduce a couple lines of code by passing dsi_ctx to the function >> instead of ctx. If I'd kept the print inside, it would require us to >> declare a `struct device*` variable which would require ctx as far as >> I've seen and just overall introduces some lines that we could otherwise >> avoid. I've done this in a couple other panels too. > > Ah, OK. That's a reasonable reason. Thanks for the explanation... > > > -Doug -- Tejas Vipin