From nobody Fri Oct 3 20:29:10 2025 Received: from mx.gpxsee.org (mx.gpxsee.org [37.205.14.76]) (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 E087D17C211; Tue, 26 Aug 2025 16:29:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=37.205.14.76 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756225749; cv=none; b=Ui30eFShS3xXmI12+VMURmxx6BVUi0usrTzCl/gkQXDcGYk/OzmSn0zNPByA902fG1mEk8aL+KpBSdypqRxc/gdnFx3zRVgdXyRwQqo4lrUCrZbodN2fne8Zkz2hau/znpkQa0TuwzuPemRqYNMLTf6xd3KmNrFY/JIR7xMrO7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756225749; c=relaxed/simple; bh=AAcyihQv5XLEctuNaZICT2NIJkI17KX4f1zliLxnpik=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=MUs6+2meCwdZ9p4UqHk2eGGHNoQ22QZA73oafDaZQv5KnWC/gvlwEyns0wAOl6g7rruYk4vdXJx8F8YOm3BV0JU65UXwYD7wPDiviclWWDFiHJZK3KEytnRNN/Flxd6smn9+k9gzX2trciwQHA27QeCkg9r976CusRQ7Y5LEbNc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gpxsee.org; spf=pass smtp.mailfrom=gpxsee.org; arc=none smtp.client-ip=37.205.14.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gpxsee.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gpxsee.org Received: from localhost (unknown [62.77.71.229]) by mx.gpxsee.org (Postfix) with ESMTPSA id E39E453EB3; Tue, 26 Aug 2025 18:28:52 +0200 (CEST) From: tumic@gpxsee.org To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Martin=20T=C5=AFma?= Subject: [PATCH v2] media: pci: mgb4: Fix timings comparison in VIDIOC_S_DV_TIMINGS Date: Tue, 26 Aug 2025 18:28:29 +0200 Message-ID: <20250826162829.4434-1-tumic@gpxsee.org> X-Mailer: git-send-email 2.51.0 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="utf-8" Content-Transfer-Encoding: quoted-printable From: Martin T=C5=AFma Compare the whole v4l2_bt_timings struct, not just the width/height when setting new timings. Timings with the same resolution and different pixelclock can now be properly set. Signed-off-by: Martin T=C5=AFma --- drivers/media/pci/mgb4/mgb4_vin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/pci/mgb4/mgb4_vin.c b/drivers/media/pci/mgb4/mgb= 4_vin.c index 989e93f67f75..42c327bc50e1 100644 --- a/drivers/media/pci/mgb4/mgb4_vin.c +++ b/drivers/media/pci/mgb4/mgb4_vin.c @@ -610,8 +610,7 @@ static int vidioc_s_dv_timings(struct file *file, void = *fh, timings->bt.height < video_timings_cap.bt.min_height || timings->bt.height > video_timings_cap.bt.max_height) return -EINVAL; - if (timings->bt.width =3D=3D vindev->timings.bt.width && - timings->bt.height =3D=3D vindev->timings.bt.height) + if (v4l2_match_dv_timings(timings, &vindev->timings, 0, false)) return 0; if (vb2_is_busy(&vindev->queue)) return -EBUSY; base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc --=20 2.51.0