Skip to content

Rebase to 6.4-rc2+ #136

Closed
Closed

Description

@kwizart

I've rebased grate/linux on top of 6.4-rc2 and this needs the following fixes that needs squashing (at least).

commit 18d10c789414c990b017833655593a9f285e6d54 (HEAD -> grate-stable)
Author: Nicolas Chauvet <[email protected]>
Date:   Mon May 1 12:15:41 2023 +0200

    Switch to probe_new
    
    Signed-off-by: Nicolas Chauvet <[email protected]>

diff --git a/drivers/leds/leds-isa1200.c b/drivers/leds/leds-isa1200.c
index 0d849a87e9f0..edf510bcfed9 100644
--- a/drivers/leds/leds-isa1200.c
+++ b/drivers/leds/leds-isa1200.c
@@ -401,8 +401,7 @@ static int isa1200_parse_dt(struct i2c_client *client,
 }
 #endif
 
-static int isa1200_vibrator_i2c_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int isa1200_vibrator_i2c_probe(struct i2c_client *client)
 {
        struct isa1200_vibrator_platform_data *pdata = NULL;
        struct isa1200_vibrator_drvdata *ddata;
@@ -543,7 +542,7 @@ static struct i2c_driver isa1200_vibrator_i2c_driver = {
                .of_match_table = of_match_ptr(isa1200_dt_match),
                .owner = THIS_MODULE,
        },
-       .probe     = isa1200_vibrator_i2c_probe,
+       .probe_new = isa1200_vibrator_i2c_probe,
        .remove    = isa1200_vibrator_i2c_remove,
        .id_table  = isa1200_vibrator_device_id,
 };

commit 7741c5c98d94996edecc4f2df854a54beaf945e2
Author: Nicolas Chauvet <[email protected]>
Date:   Mon May 1 12:10:50 2023 +0200

    Add missing of.h

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 3b97a752dea7..df71329ab0bb 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -34,6 +34,7 @@
 #include <drm/drm_utils.h>
 
 #include <linux/property.h>
+#include <linux/of.h>
 #include <linux/uaccess.h>
 
 #include <video/cmdline.h>

commit f0b410fe79b693ed2b3f846d553049558f4c8012
Author: Nicolas Chauvet <[email protected]>
Date:   Mon May 1 12:10:38 2023 +0200

    Sync with tegra/sor.c

diff --git a/drivers/gpu/drm/grate/sor.c b/drivers/gpu/drm/grate/sor.c
index 8af632740673..fbb63d755496 100644
--- a/drivers/gpu/drm/grate/sor.c
+++ b/drivers/gpu/drm/grate/sor.c
@@ -1153,7 +1153,7 @@ static int tegra_sor_compute_config(struct tegra_sor *sor,
                                    struct drm_dp_link *link)
 {
        const u64 f = 100000, link_rate = link->rate * 1000;
-       const u64 pclk = mode->clock * 1000;
+       const u64 pclk = (u64)mode->clock * 1000;
        u64 input, output, watermark, num;
        struct tegra_sor_params params;
        u32 num_syms_per_line;
@@ -2140,10 +2140,8 @@ static void tegra_sor_hdmi_disable_scrambling(struct tegra_sor *sor)
 
 static void tegra_sor_hdmi_scdc_disable(struct tegra_sor *sor)
 {
-       struct i2c_adapter *ddc = sor->output.ddc;
-
-       drm_scdc_set_high_tmds_clock_ratio(ddc, false);
-       drm_scdc_set_scrambling(ddc, false);
+       drm_scdc_set_high_tmds_clock_ratio(&sor->output.connector, false);
+       drm_scdc_set_scrambling(&sor->output.connector, false);
 
        tegra_sor_hdmi_disable_scrambling(sor);
 }
@@ -2168,10 +2166,8 @@ static void tegra_sor_hdmi_enable_scrambling(struct tegra_sor *sor)
 
 static void tegra_sor_hdmi_scdc_enable(struct tegra_sor *sor)
 {
-       struct i2c_adapter *ddc = sor->output.ddc;
-
-       drm_scdc_set_high_tmds_clock_ratio(ddc, true);
-       drm_scdc_set_scrambling(ddc, true);
+       drm_scdc_set_high_tmds_clock_ratio(&sor->output.connector, true);
+       drm_scdc_set_scrambling(&sor->output.connector, true);
 
        tegra_sor_hdmi_enable_scrambling(sor);
 }
@@ -2179,9 +2175,8 @@ static void tegra_sor_hdmi_scdc_enable(struct tegra_sor *sor)
 static void tegra_sor_hdmi_scdc_work(struct work_struct *work)
 {
        struct tegra_sor *sor = container_of(work, struct tegra_sor, scdc.work);
-       struct i2c_adapter *ddc = sor->output.ddc;
 
-       if (!drm_scdc_get_scrambling_status(ddc)) {
+       if (!drm_scdc_get_scrambling_status(&sor->output.connector)) {
                DRM_DEBUG_KMS("SCDC not scrambled\n");
                tegra_sor_hdmi_scdc_enable(sor);
        }
@@ -2964,11 +2959,9 @@ static int tegra_sor_hdmi_probe(struct tegra_sor *sor)
        int err;
 
        sor->avdd_io_supply = devm_regulator_get(sor->dev, "avdd-io-hdmi-dp");
-       if (IS_ERR(sor->avdd_io_supply)) {
-               dev_err(sor->dev, "cannot get AVDD I/O supply: %ld\n",
-                       PTR_ERR(sor->avdd_io_supply));
-               return PTR_ERR(sor->avdd_io_supply);
-       }
+       if (IS_ERR(sor->avdd_io_supply))
+               return dev_err_probe(sor->dev, PTR_ERR(sor->avdd_io_supply),
+                                    "cannot get AVDD I/O supply\n");
 
        err = tegra_sor_enable_regulator(sor, sor->avdd_io_supply);
        if (err < 0) {
@@ -2978,11 +2971,9 @@ static int tegra_sor_hdmi_probe(struct tegra_sor *sor)
        }
 
        sor->vdd_pll_supply = devm_regulator_get(sor->dev, "vdd-hdmi-dp-pll");
-       if (IS_ERR(sor->vdd_pll_supply)) {
-               dev_err(sor->dev, "cannot get VDD PLL supply: %ld\n",
-                       PTR_ERR(sor->vdd_pll_supply));
-               return PTR_ERR(sor->vdd_pll_supply);
-       }
+       if (IS_ERR(sor->vdd_pll_supply))
+               return dev_err_probe(sor->dev, PTR_ERR(sor->vdd_pll_supply),
+                                    "cannot get VDD PLL supply\n");
 
        err = tegra_sor_enable_regulator(sor, sor->vdd_pll_supply);
        if (err < 0) {
@@ -2992,11 +2983,9 @@ static int tegra_sor_hdmi_probe(struct tegra_sor *sor)
        }
 
        sor->hdmi_supply = devm_regulator_get(sor->dev, "hdmi");
-       if (IS_ERR(sor->hdmi_supply)) {
-               dev_err(sor->dev, "cannot get HDMI supply: %ld\n",
-                       PTR_ERR(sor->hdmi_supply));
-               return PTR_ERR(sor->hdmi_supply);
-       }
+       if (IS_ERR(sor->hdmi_supply))
+               return dev_err_probe(sor->dev, PTR_ERR(sor->hdmi_supply),
+                                    "cannot get HDMI supply\n");
 
        err = tegra_sor_enable_regulator(sor, sor->hdmi_supply);
        if (err < 0) {
@@ -3799,10 +3788,8 @@ static int tegra_sor_probe(struct platform_device *pdev)
        }
 
        err = platform_get_irq(pdev, 0);
-       if (err < 0) {
-               dev_err(&pdev->dev, "failed to get IRQ: %d\n", err);
+       if (err < 0)
                goto remove;
-       }
 
        sor->irq = err;
 
@@ -3978,17 +3965,11 @@ static int tegra_sor_probe(struct platform_device *pdev)
        return err;
 }
 
-static int tegra_sor_remove(struct platform_device *pdev)
+static void tegra_sor_remove(struct platform_device *pdev)
 {
        struct tegra_sor *sor = platform_get_drvdata(pdev);
-       int err;
 
-       err = host1x_client_unregister(&sor->client);
-       if (err < 0) {
-               dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
-                       err);
-               return err;
-       }
+       host1x_client_unregister(&sor->client);
 
        pm_runtime_disable(&pdev->dev);
 
@@ -3998,8 +3979,6 @@ static int tegra_sor_remove(struct platform_device *pdev)
        }
 
        tegra_output_remove(&sor->output);
-
-       return 0;
 }
 
 static int __maybe_unused tegra_sor_suspend(struct device *dev)
@@ -4059,5 +4038,5 @@ struct platform_driver tegra_sor_driver = {
                .pm = &tegra_sor_pm_ops,
        },
        .probe = tegra_sor_probe,
-       .remove = tegra_sor_remove,
+       .remove_new = tegra_sor_remove,
 };


Activity

  1. clamor-s commented on Jun 17, 2023

    @clamor-s
    Member

    @kwizart clamor-s/linux@5b91414 or you can use my grate-base branch for now. I am waiting for 6.4 stable.

  2. kwizart commented on Jun 18, 2023

    @kwizart
    ContributorAuthor

    @clamor-s Thanks, it worksforme, (tested on PAZ00) but for some reason the emc-table patch was dropped, I should be able to rebase if something broke with it...

  3. clamor-s commented on Jun 18, 2023

    @clamor-s
    Member

    @kwizart my grate-base contains just bare minimum for testing devices I own. I could miss some changes, if you need those, just pick from main grate/linux repo.

  4. digetx commented on Jun 18, 2023

    @digetx
    Member

    Kernel is rebased now on recent linux-next

  5. clamor-s commented on Jun 19, 2023

    @clamor-s
    Member

    @digetx is there unsquashed version of this commit 50b7a58? I would like to see history.

  6. digetx commented on Jun 20, 2023

    @digetx
    Member

    There is no history for the drm/grate, it always was a single commit

  7. clamor-s commented on Jun 20, 2023

    @clamor-s
    Member

    @digetx I was thinking of tearing the grate/linux apart and creating a set of device dedicated branches + base branch and then just squash them all from time to time once there are major updates. In this case you can focus on base generic stuff while other branches like transformers lg-x3 surface-rt samsung-p4-glide misc etc will be maintained and looked after by their devs.

  8. digetx commented on Jun 21, 2023

    @digetx
    Member

    Good to me

  9. clamor-s commented on Jun 22, 2023

    @clamor-s
    Member

    @digetx @kwizart this is partially done re-factoring, a concept of what I mean.

    https://github.com/clamor-s/linux-concept

    transformer, lg-x3 branches are device dedicated (completed) and there will be samsung, ms surface and misc (for paz00, qemu and lenovo) banches as well if you accept this to be set in grate/linux
    base branch contains almost all common stuff and I have mostly finished its setup as well

  10. kwizart commented on Jun 22, 2023

    @kwizart
    ContributorAuthor

    I'm fine having more than the strict necessary for my devices. (I'm using paz00/trimslice/jetson-tk1 , have tf701/nyan-big near). So I only plan to build a single kernel for all of them. But having them in branches make senses if different maintainers can update independently ...

    Transformer branch is still a "collective" works with less devices, so It only changes the "scale", not the need to coordinate.

    Also this conversation within this ticket make senses to me since I exactly had to forward patches to various maintainers in order to rebase to newer kernel. and hopefully the maintainer didn't had a diverging copy of the patches in WIP (because they would have updated it on their side).

    So I'm not sure if splitting into devices branches solves all problems, but at least it will probably helps to share the work when rebasing branches...

  11. clamor-s commented on Jun 22, 2023

    @clamor-s
    Member

    I'm fine having more than the strict necessary for my devices. (I'm using paz00/trimslice/jetson-tk1 , have tf701/nyan-big near). So I only plan to build a single kernel for all of them. But having them in branches make senses if different maintainers can update independently ...

    There still should be a master branch with, for example, rebase of all branches on stable releases.

    Transformer branch is still a "collective" works with less devices, so It only changes the "scale", not the need to coordinate.

    I am the one who maintains all transformers and most patches related to them go through my repos.

    So I'm not sure if splitting into devices branches solves all problems, but at least it will probably helps to share the work when rebasing branches...

    There is no universal solution unfortunately

  12. kwizart commented on Feb 13, 2024

    @kwizart
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions