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

Commit 9b1f94bf authored by flar2's avatar flar2 Committed by Razziell
Browse files

drivers: disbale kcal by default and updates

parent 12322912
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ config FB_MSM_MDSS_FRC_DEBUG
config FB_MSM_MDSS_KCAL_CTRL
	depends on FB_MSM_MDSS
	bool "MDSS color control"
        default n
	---help---
	  Enable sysfs for post-processing control of mdss-mdp5 display
	  controllers in MDSS.
        Enable sysfs for rgb/lut control for mdss-mdp display controllers
	in the MDSS sub-system.
+11 −11
Original line number Diff line number Diff line
@@ -409,10 +409,10 @@ static ssize_t kcal_invert_store(struct device *dev,
		return -EINVAL;

	//disable
	lut_data->invert = 0;
	lut_data->invert = kcal_invert;

	//mdss_mdp_kcal_update_igc(lut_data);
	//mdss_mdp_kcal_display_commit();
	mdss_mdp_kcal_update_igc(lut_data);
	mdss_mdp_kcal_display_commit();

	return count;
}
@@ -533,7 +533,7 @@ static DEVICE_ATTR(kcal, S_IWUSR | S_IRUGO, kcal_show, kcal_store);
static DEVICE_ATTR(kcal_min, S_IWUSR | S_IRUGO, kcal_min_show, kcal_min_store);
static DEVICE_ATTR(kcal_enable, S_IWUSR | S_IRUGO, kcal_enable_show,
	kcal_enable_store);
static DEVICE_ATTR(kcal_invert, S_IWUSR | S_IRUGO, kcal_invert_show,
static DEVICE_ATTR(kcal_invert_obsolete, S_IWUSR | S_IRUGO, kcal_invert_show,
	kcal_invert_store);
static DEVICE_ATTR(kcal_sat, S_IWUSR | S_IRUGO, kcal_sat_show, kcal_sat_store);
static DEVICE_ATTR(kcal_hue, S_IWUSR | S_IRUGO, kcal_hue_show, kcal_hue_store);
@@ -555,7 +555,7 @@ static int kcal_ctrl_probe(struct platform_device *pdev)

	platform_set_drvdata(pdev, lut_data);

	lut_data->enable = 0x1;
	lut_data->enable = 0x0; // KCAL driver is off by default
	lut_data->red = DEF_PCC;
	lut_data->green = DEF_PCC;
	lut_data->blue = DEF_PCC;
@@ -566,15 +566,15 @@ static int kcal_ctrl_probe(struct platform_device *pdev)
	lut_data->val = DEF_PA;
	lut_data->cont = DEF_PA;

	mdss_mdp_kcal_update_pcc(lut_data);
	mdss_mdp_kcal_update_pa(lut_data);
	mdss_mdp_kcal_update_igc(lut_data);
	mdss_mdp_kcal_display_commit();
	//mdss_mdp_kcal_update_pcc(lut_data);
	//mdss_mdp_kcal_update_pa(lut_data);
	//mdss_mdp_kcal_update_igc(lut_data);
	//mdss_mdp_kcal_display_commit();

	ret = device_create_file(&pdev->dev, &dev_attr_kcal);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_min);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_enable);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_invert);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_invert_obsolete);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_sat);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_hue);
	ret |= device_create_file(&pdev->dev, &dev_attr_kcal_val);
@@ -592,7 +592,7 @@ static int kcal_ctrl_remove(struct platform_device *pdev)
	device_remove_file(&pdev->dev, &dev_attr_kcal);
	device_remove_file(&pdev->dev, &dev_attr_kcal_min);
	device_remove_file(&pdev->dev, &dev_attr_kcal_enable);
	device_remove_file(&pdev->dev, &dev_attr_kcal_invert);
	device_remove_file(&pdev->dev, &dev_attr_kcal_invert_obsolete);
	device_remove_file(&pdev->dev, &dev_attr_kcal_sat);
	device_remove_file(&pdev->dev, &dev_attr_kcal_hue);
	device_remove_file(&pdev->dev, &dev_attr_kcal_val);