Skip to content

Commit

Permalink
Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/…
Browse files Browse the repository at this point in the history
…linux into drm-fixes

- backport of a DC change which fixes a greenish tint on some RV hw
- properly handle kzalloc fail in ttm

* 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux:
  drm/ttm: check the return value of kzalloc
  drm/amd/display: call set csc_default if enable adjustment is false
  • Loading branch information
Dave Airlie committed Jan 4, 2018
2 parents dc042da + 19d859a commit 0007b9c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ void dpp1_cm_set_output_csc_adjustment(

void dpp1_cm_set_output_csc_default(
struct dpp *dpp_base,
const struct default_adjustment *default_adjust);
enum dc_color_space colorspace);

void dpp1_cm_set_gamut_remap(
struct dpp *dpp,
Expand Down
6 changes: 2 additions & 4 deletions drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,13 @@ void dpp1_cm_set_gamut_remap(

void dpp1_cm_set_output_csc_default(
struct dpp *dpp_base,
const struct default_adjustment *default_adjust)
enum dc_color_space colorspace)
{

struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base);
uint32_t ocsc_mode = 0;

if (default_adjust != NULL) {
switch (default_adjust->out_color_space) {
switch (colorspace) {
case COLOR_SPACE_SRGB:
case COLOR_SPACE_2020_RGB_FULLRANGE:
ocsc_mode = 0;
Expand All @@ -253,7 +252,6 @@ void dpp1_cm_set_output_csc_default(
case COLOR_SPACE_UNKNOWN:
default:
break;
}
}

REG_SET(CM_OCSC_CONTROL, 0, CM_OCSC_MODE, ocsc_mode);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,8 @@ static void program_csc_matrix(struct pipe_ctx *pipe_ctx,
tbl_entry.color_space = color_space;
//tbl_entry.regval = matrix;
pipe_ctx->plane_res.dpp->funcs->opp_set_csc_adjustment(pipe_ctx->plane_res.dpp, &tbl_entry);
} else {
pipe_ctx->plane_res.dpp->funcs->opp_set_csc_default(pipe_ctx->plane_res.dpp, colorspace);
}
}
static bool is_lower_pipe_tree_visible(struct pipe_ctx *pipe_ctx)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct dpp_funcs {

void (*opp_set_csc_default)(
struct dpp *dpp,
const struct default_adjustment *default_adjust);
enum dc_color_space colorspace);

void (*opp_set_csc_adjustment)(
struct dpp *dpp,
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/ttm/ttm_page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages)
pr_info("Initializing pool allocator\n");

_manager = kzalloc(sizeof(*_manager), GFP_KERNEL);
if (!_manager)
return -ENOMEM;

ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc", 0);

Expand Down

0 comments on commit 0007b9c

Please sign in to comment.