setup_x_points_distribution();
}
+static inline struct fixed31_32 amdgpu_dm_fixpt_from_s3132(__u64 x)
+{
+ struct fixed31_32 val;
+
+ /* If negative, convert to 2's complement. */
+ if (x & (1ULL << 63))
+ x = -(x & ~(1ULL << 63));
+
+ val.value = x;
+ return val;
+}
+
#ifdef AMD_PRIVATE_COLOR
/* Pre-defined Transfer Functions (TF)
*
}
/* gamut_remap_matrix[i] = ctm[i - floor(i/4)] */
- matrix[i] = dc_fixpt_from_s3132(ctm->matrix[i - (i / 4)]);
+ matrix[i] = amdgpu_dm_fixpt_from_s3132(ctm->matrix[i - (i / 4)]);
}
}
*/
for (i = 0; i < 12; i++) {
/* gamut_remap_matrix[i] = ctm[i - floor(i/4)] */
- matrix[i] = dc_fixpt_from_s3132(ctm->matrix[i]);
+ matrix[i] = amdgpu_dm_fixpt_from_s3132(ctm->matrix[i]);
}
}
uint32_t shaper_size, lut3d_size, blend_size;
int ret;
- dc_plane_state->hdr_mult = dc_fixpt_from_s3132(dm_plane_state->hdr_mult);
+ dc_plane_state->hdr_mult = amdgpu_dm_fixpt_from_s3132(dm_plane_state->hdr_mult);
shaper_lut = __extract_blob_lut(dm_plane_state->shaper_lut, &shaper_size);
shaper_size = shaper_lut != NULL ? shaper_size : 0;
static const struct fixed31_32 dc_fixpt_half = { 0x80000000LL };
static const struct fixed31_32 dc_fixpt_one = { 0x100000000LL };
-static inline struct fixed31_32 dc_fixpt_from_s3132(__u64 x)
-{
- struct fixed31_32 val;
-
- /* If negative, convert to 2's complement. */
- if (x & (1ULL << 63))
- x = -(x & ~(1ULL << 63));
-
- val.value = x;
- return val;
-}
-
/*
* @brief
* Initialization routines