[Intel-gfx] [PATCH v2] drm/i915: Rename defines for selection of ddi buffer translation slot
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Aug 27 13:16:13 CEST 2014
On Fri, Aug 08, 2014 at 01:36:17PM +0100, Damien Lespiau wrote:
> On Fri, Aug 08, 2014 at 05:47:25PM +0530, sonika.jindal at intel.com wrote:
> > /* Start the training iterating through available voltages and emphasis,
> > * testing each value twice. */
> > - for (i = 0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values) * 2; i++) {
> > + for (i = 0; i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
>
> This is correct but obsfucated. You're actually doing
> ARRAY_SIZE(hsw_ddi_translations_fdi) / 2 * 2 and we might as well give
> the ARRAY_SIZE(hsw_ddi_translations_fdi) / 2 a proper name like I
> suggested.
I've been wondering why we don't have something like:
struct ddi_buf_trans {
u32 deemp;
u32 vswing;
}
and use that instead of having the magic /2 appear in places.
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list