Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12334a72 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: sde: Remove feature support for IGC/3D LUT for virtual planes"

parents c60f7a7a d5ed52b0
Loading
Loading
Loading
Loading
+22 −6
Original line number Diff line number Diff line
@@ -1000,10 +1000,16 @@ static void sde_hw_sspp_setup_cdp(struct sde_hw_pipe *ctx,
}

static void _setup_layer_ops_colorproc(struct sde_hw_pipe *c,
		unsigned long features)
		unsigned long features, bool is_virtual_pipe)
{
	int ret = 0;

	if (is_virtual_pipe) {
		features &=
			~(BIT(SDE_SSPP_VIG_IGC) | BIT(SDE_SSPP_VIG_GAMUT));
		c->cap->features = features;
	}

	if (test_bit(SDE_SSPP_HSIC, &features)) {
		if (c->cap->sblk->hsic_blk.version ==
			(SDE_COLOR_PROCESS_VER(0x1, 0x7))) {
@@ -1191,7 +1197,7 @@ static void sde_hw_sspp_setup_line_insertion(struct sde_hw_pipe *ctx,
}

static void _setup_layer_ops(struct sde_hw_pipe *c,
		unsigned long features)
		unsigned long features, bool is_virtual_pipe)
{
	int ret;

@@ -1256,7 +1262,7 @@ static void _setup_layer_ops(struct sde_hw_pipe *c,
	if (test_bit(SDE_SSPP_CDP, &features))
		c->ops.setup_cdp = sde_hw_sspp_setup_cdp;

	_setup_layer_ops_colorproc(c, features);
	_setup_layer_ops_colorproc(c, features, is_virtual_pipe);

	if (test_bit(SDE_SSPP_DGM_INVERSE_PMA, &features))
		c->ops.setup_inverse_pma = sde_hw_sspp_setup_dgm_inverse_pma;
@@ -1276,6 +1282,7 @@ static struct sde_sspp_cfg *_sspp_offset(enum sde_sspp sspp,
		struct sde_hw_blk_reg_map *b)
{
	int i;
	struct sde_sspp_cfg *cfg;

	if ((sspp < SSPP_MAX) && catalog && addr && b) {
		for (i = 0; i < catalog->sspp_count; i++) {
@@ -1285,7 +1292,14 @@ static struct sde_sspp_cfg *_sspp_offset(enum sde_sspp sspp,
				b->length = catalog->sspp[i].len;
				b->hwversion = catalog->hwversion;
				b->log_mask = SDE_DBG_MASK_SSPP;
				return &catalog->sspp[i];

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

				/* Only shallow copy is needed */
				memcpy(cfg, &catalog->sspp[i], sizeof(*cfg));
				return cfg;
			}
		}
	}
@@ -1324,7 +1338,7 @@ struct sde_hw_pipe *sde_hw_sspp_init(enum sde_sspp idx,
	hw_pipe->mdp = &catalog->mdp[0];
	hw_pipe->idx = idx;
	hw_pipe->cap = cfg;
	_setup_layer_ops(hw_pipe, hw_pipe->cap->features);
	_setup_layer_ops(hw_pipe, hw_pipe->cap->features, is_virtual_pipe);

	if (hw_pipe->ops.get_scaler_ver) {
		sde_init_scaler_blk(&hw_pipe->cap->sblk->scaler_blk,
@@ -1361,8 +1375,10 @@ struct sde_hw_pipe *sde_hw_sspp_init(enum sde_sspp idx,

void sde_hw_sspp_destroy(struct sde_hw_pipe *ctx)
{
	if (ctx)
	if (ctx) {
		sde_hw_blk_destroy(&ctx->base);
		kfree(ctx->cap);
	}
	kfree(ctx);
}
+1 −1
Original line number Diff line number Diff line
@@ -5247,7 +5247,7 @@ static int _sde_plane_init_debugfs(struct drm_plane *plane)
		return -ENOMEM;

	/* don't error check these */
	debugfs_create_ulong("features", 0600,
	debugfs_create_ulong("features", 0400,
			psde->debugfs_root, &psde->features);

	/* add register dump support */