Skip to content

Commit

Permalink
drm/amd/display: Add SPL namespace
Browse files Browse the repository at this point in the history
[Why]
In order to avoid component conflicts, spl namespace is needed.

[How]
Adding SPL namespace to the public API os that each user of SPL can have
their own namespace.

Signed-off-by: Navid Assadian <Navid.Assadian@amd.com>
Reviewed-by: Samson Tam <Samson.Tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Navid Assadian authored and Alex Deucher committed Feb 25, 2025
1 parent 259eacb commit 0fe2df4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,7 @@ static bool spl_calculate_number_of_taps(struct spl_in *spl_in, struct spl_scrat
}

/* Calculate scaler parameters */
bool spl_calculate_scaler_params(struct spl_in *spl_in, struct spl_out *spl_out)
bool SPL_NAMESPACE(spl_calculate_scaler_params(struct spl_in *spl_in, struct spl_out *spl_out))
{
bool res = false;
bool enable_easf_v = false;
Expand Down Expand Up @@ -1884,7 +1884,7 @@ bool spl_calculate_scaler_params(struct spl_in *spl_in, struct spl_out *spl_out)
}

/* External interface to get number of taps only */
bool spl_get_number_of_taps(struct spl_in *spl_in, struct spl_out *spl_out)
bool SPL_NAMESPACE(spl_get_number_of_taps(struct spl_in *spl_in, struct spl_out *spl_out))
{
bool res = false;
bool enable_easf_v = false;
Expand Down
16 changes: 14 additions & 2 deletions drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@
#define BLACK_OFFSET_RGB_Y 0x0
#define BLACK_OFFSET_CBCR 0x8000

#ifndef SPL_PFX_
#define SPL_PFX_
#endif

#define SPL_EXPAND2(a, b) a##b
#define SPL_EXPAND(a, b) SPL_EXPAND2(a, b)
#define SPL_NAMESPACE(symbol) SPL_EXPAND(SPL_PFX_, symbol)

#ifdef __cplusplus
extern "C" {
#endif

/* SPL interfaces */

bool spl_calculate_scaler_params(struct spl_in *spl_in, struct spl_out *spl_out);
bool SPL_NAMESPACE(spl_calculate_scaler_params(struct spl_in *spl_in, struct spl_out *spl_out));

bool spl_get_number_of_taps(struct spl_in *spl_in, struct spl_out *spl_out);
bool SPL_NAMESPACE(spl_get_number_of_taps(struct spl_in *spl_in, struct spl_out *spl_out));

#endif /* __DC_SPL_H__ */

0 comments on commit 0fe2df4

Please sign in to comment.