From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 28B4B3DDDC9 for ; Tue, 19 May 2026 09:02:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779181323; cv=none; b=V5Hbb06rPC0LUf1u2T1oJ42U0Hn1UNN4cFu5VnF9EMtYz+IcdSj1BZWPu2GtVz54lI5cPu15Zcz517VS/XtnxotES85m0gX3etX7f6D02PXZTA0wLBo39ZwsaWssH6WzXEdTWP/7EKf23g9QYAnjy0yyrcCQd/gsuBT/VOf9KM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779181323; c=relaxed/simple; bh=rhtk3UHiok35VYYKD9BOmc0uxi7SU8cweGiDLJAn7QA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b2RGhUMX9cUTGNWTVR4sibyGgQbGI5FvjhkWWYF7QpxMeWwY3bi+ZCjTW/JVgExKQCRuxaPIDagTuDRkje3HhWFQFKZHh7Ar7hmYZyBHhm7CKY98BJ3PotTa45Um0+AqNy5qQyZGzeFlfxgfUrIlDub6IEKJK0XXIbuwrHq0TMQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=SZoC40w5; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="SZoC40w5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779181321; x=1810717321; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rhtk3UHiok35VYYKD9BOmc0uxi7SU8cweGiDLJAn7QA=; b=SZoC40w5Y0EAQvWgGuQ1RmPKfhJ02T/ESKkn2W8zKObjaXRZspS/erp0 lAv5nWU/h8yjuKm5a0u+mZcqIW5zgt/mGlNS/A/UOFMee9DWGcozImZLB UxciGHViIfnZw2yUnM3M72y7LrkYaqkreK9eavGBoLGM2Le9cUOTRkE8X gCqmDqe2WaGjJa+vw3y/7G1YWSubmLEekng2cOYLj49gAortIONHVT4D5 jB5Z8sllx7p9QjgCftCUt6Oe3eNc0TJDgMVP9NxZMCLajr1N2J4vHPJi1 uzFuvZLUVmhbzbZ6/Djm08Sesvu3sJNI5OhCeR4D6gSv6uSzpvxb48p05 g==; X-CSE-ConnectionGUID: b7vQNrk0SQqFRm/UpQcq5g== X-CSE-MsgGUID: mUtGWRVxSuePW+9W86cFUQ== X-IronPort-AV: E=Sophos;i="6.23,243,1770620400"; d="scan'208";a="224955533" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 19 May 2026 02:02:00 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Tue, 19 May 2026 02:02:00 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Tue, 19 May 2026 02:01:56 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , CC: Subject: [PATCH 1/8] drm: atmel-hlcdc: Fix off-by-one in vertical back porch setting Date: Tue, 19 May 2026 14:31:28 +0530 Message-ID: <20260519090135.1188405-2-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260519090135.1188405-1-manikandan.m@microchip.com> References: <20260519090135.1188405-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="y" Content-Transfer-Encoding: 8bit The vertical back porch field in ATMEL_HLCDC_CFG(2) was programmed without subtracting 1, unlike the other timing parameters which follow the controller’s (value - 1) encoding requirement. This results in an off-by-one error in the vertical back porch timing. Signed-off-by: Manikandan Muralidharan --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index 9dbac2def333..7932d666e9ec 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -115,7 +115,7 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) (vm.hsync_len - 1) | ((vm.vsync_len - 1) << 16)); regmap_write(regmap, ATMEL_HLCDC_CFG(2), - (vm.vfront_porch - 1) | (vm.vback_porch << 16)); + (vm.vfront_porch - 1) | ((vm.vback_porch - 1) << 16)); regmap_write(regmap, ATMEL_HLCDC_CFG(3), (vm.hfront_porch - 1) | ((vm.hback_porch - 1) << 16)); -- 2.25.1