From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 BA6D8394781 for ; Wed, 20 May 2026 07:51:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779263505; cv=none; b=Rr5BwuFq2OaPm4vdCS9Kk4IVy5CAjh4jV6A4ibHihpXksQ/g/dwwqHxJ4ge1M9MehyvXzzT+zMTudhORPFidAJujc1lSGw+DNC7+IAPOfrdAs7tvwrImvqtR2oZ/s2Uj55jPuVFAM+QZsEU99Yy4BMKKksRUQJdWQQl7e4D6x1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779263505; c=relaxed/simple; bh=2pdK7yMl0Eu0KFZCN1GWHW+vyDl/j8o2jsVU8JerzZg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=RRUX2C/+00dLDDbX/dloiwEpx7L5RcoOY9hC9G+tut4xrRcV6iPJ36LbRUhT4IwdnMLemZJNpEvAbqKEA3qrPRc5UHM2BRHVYjsiTzIz//HwtaUel1PVgLtIAy8+rapUm362RE9kc3aXQx7W4BkO74scdG4WNYvynagBVfGo74Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=CJp1K6J7; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CJp1K6J7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779263504; x=1810799504; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=2pdK7yMl0Eu0KFZCN1GWHW+vyDl/j8o2jsVU8JerzZg=; b=CJp1K6J7TR4DM899l41mcBpZWtZS068lxtAcvj6H432hZl9CeDUjfKNZ eHDEMSrnGkALsq5FMTFj4QDEr2kjcVaMht8uJa64aNycSa6J08ad9o06E t4zfgBYLi2/TlKMOZRc1qvMvy3vhq0yRiqiKL3Htjcm53Ao5ddjOrcihq gIuzn9m+V7EyuMfeQsXA8i9oVv+6lEaGUK/+Exy8weutG6pAbMsN4hBU5 gPl1wg4uOF2MkKxZYen17lFUoexjU9sC+kiVfHCije0/EKJ0bXeNnLIrA vB40Ashj8g5T98EoEElcQE3V1LPVSgvnrG7dHvSiSHc6Kw5wKhxa1O917 Q==; X-CSE-ConnectionGUID: tDhJNVOOTsCiMBI74YMeug== X-CSE-MsgGUID: 2RW7TQWNTFu3e7529yoR3w== X-IronPort-AV: E=McAfee;i="6800,10657,11791"; a="84037255" X-IronPort-AV: E=Sophos;i="6.23,243,1770624000"; d="scan'208";a="84037255" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2026 00:51:44 -0700 X-CSE-ConnectionGUID: EyTDGv4fQs+JFOdnTTFM0Q== X-CSE-MsgGUID: 1xOQ8bmQTF20w+BNoD4pmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,243,1770624000"; d="scan'208";a="240321993" Received: from klitkey1-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.148]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2026 00:51:41 -0700 From: Jani Nikula To: Javier Martinez Canillas , linux-kernel@vger.kernel.org Cc: Maxime Ripard , David Airlie , Dmitry Baryshkov , Nicolas Frattaroli , Simona Vetter , dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants In-Reply-To: <875x4iy1em.fsf@ocarina.mail-host-address-is-not-set> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <20260519144712.1418302-1-javierm@redhat.com> <20260519144712.1418302-2-javierm@redhat.com> <78506dc5f7ff02a2bdd05de1170a1cb3e33e1abe@intel.com> <875x4iy1em.fsf@ocarina.mail-host-address-is-not-set> Date: Wed, 20 May 2026 10:51:37 +0300 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, 20 May 2026, Javier Martinez Canillas wrote: > Jani Nikula writes: > > Hello Jani, > >> On Tue, 19 May 2026, Javier Martinez Canillas wrote: > > [...] > >>> >>> +/* HDMI spec TMDS character rate limits (in Hz) */ >>> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000 >>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000 >>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000 >>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000 >> >> Usually everything in DRM is in kHz, and Hz is the exception. >> > > That is correct but in this case these constants are to be used with the > HDMI helpers. Both struct drm_connector_hdmi_state.tmds_char_rate and > the struct drm_bridge_funcs.hdmi_tmds_char_rate_valid() callback expect > the TMDS char rate to be defined in Hz. I guess I'm surprised those things were defined in terms of Hz then. > If we define these in kHz, it means that drivers will have to * 1000 at > every call site. Yeah, not ideal. >> I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the >> code. I won't remember what they mean in Hz or kHz, and I'll have to >> look them up every single time. >> > > I discussed this with Maxime before posting the patches since I wondered > the same. He suggested that the max TMDS character rate was linked to the > HDMI spec versions and that it would be more readable to name it using > the spec version rather than the resolution. Frankly I've never thought of the limits in terms of the spec versions, but maybe it's just me. *shrug* BR, Jani. > > The other naming I suggested was: > > /* HDMI spec TMDS character rate limits (in Hz) */ > #define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000 > #define DRM_HDMI_TMDS_CHAR_RATE_74_25MHZ 74250000 > #define DRM_HDMI_TMDS_CHAR_RATE_148_5MHZ 148500000 > #define DRM_HDMI_TMDS_CHAR_RATE_297MHZ 297000000 > #define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_4 340000000 > >> BR, >> Jani. >> -- Jani Nikula, Intel