lkml.org 
[lkml]   [2020]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 39/48] drm/tegra: vic: Stop channel before suspending
    Date
    Host1x channel should be idling before hardware is turned off, hence
    stop the channel in the suspend callback.

    Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
    ---
    drivers/gpu/drm/tegra/vic.c | 15 +++++++++++++++
    1 file changed, 15 insertions(+)

    diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
    index ade56b860cf9..92d3d48c4277 100644
    --- a/drivers/gpu/drm/tegra/vic.c
    +++ b/drivers/gpu/drm/tegra/vic.c
    @@ -510,8 +510,23 @@ static int vic_remove(struct platform_device *pdev)
    return 0;
    }

    +static __maybe_unused int vic_suspend(struct device *dev)
    +{
    + struct vic *vic = dev_get_drvdata(dev);
    + int err;
    +
    + host1x_channel_stop(vic->channel);
    +
    + err = pm_runtime_force_suspend(dev);
    + if (err < 0)
    + return err;
    +
    + return 0;
    +}
    +
    static const struct dev_pm_ops vic_pm_ops = {
    SET_RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL)
    + SET_SYSTEM_SLEEP_PM_OPS(vic_suspend, pm_runtime_force_resume)
    };

    struct platform_driver tegra_vic_driver = {
    --
    2.29.2
    \
     
     \ /
      Last update: 2020-12-17 19:12    [W:4.052 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site