lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26d73f36-e150-57ec-d957-4b7bda6b366e@samsung.com>
Date:   Wed, 31 Mar 2021 12:12:31 +0200
From:   Andrzej Hajda <a.hajda@...sung.com>
To:     Douglas Anderson <dianders@...omium.org>,
        Neil Armstrong <narmstrong@...libre.com>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...l.net>,
        Sam Ravnborg <sam@...nborg.org>
Cc:     robdclark@...omium.org, dri-devel@...ts.freedesktop.org,
        David Airlie <airlied@...ux.ie>, linux-arm-msm@...r.kernel.org,
        Steev Klimaszewski <steev@...i.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Stanislav Lisovskiy <stanislav.lisovskiy@...el.com>,
        Robert Foss <robert.foss@...aro.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 10/14] drm/bridge: ti-sn65dsi86: Stop caching the
 EDID ourselves


W dniu 30.03.2021 o 04:53, Douglas Anderson pisze:
> Now that we have the patch ("drm/edid: Use the cached EDID in
> drm_get_edid() if eDP") we no longer need to maintain our own
> cache. Drop this code.
>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
Reviewed-by: Andrzej Hajda <a.hajda@...sung.com>

Regards
Andrzej
> ---
>
> (no changes since v1)
>
>   drivers/gpu/drm/bridge/ti-sn65dsi86.c | 22 +++++++++-------------
>   1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 9577ebd58c4c..c0398daaa4a6 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -121,7 +121,6 @@
>    * @debugfs:      Used for managing our debugfs.
>    * @host_node:    Remote DSI node.
>    * @dsi:          Our MIPI DSI source.
> - * @edid:         Detected EDID of eDP panel.
>    * @refclk:       Our reference clock.
>    * @panel:        Our panel.
>    * @enable_gpio:  The GPIO we toggle to enable the bridge.
> @@ -147,7 +146,6 @@ struct ti_sn_bridge {
>   	struct drm_bridge		bridge;
>   	struct drm_connector		connector;
>   	struct dentry			*debugfs;
> -	struct edid			*edid;
>   	struct device_node		*host_node;
>   	struct mipi_dsi_device		*dsi;
>   	struct clk			*refclk;
> @@ -269,17 +267,17 @@ connector_to_ti_sn_bridge(struct drm_connector *connector)
>   static int ti_sn_bridge_connector_get_modes(struct drm_connector *connector)
>   {
>   	struct ti_sn_bridge *pdata = connector_to_ti_sn_bridge(connector);
> -	struct edid *edid = pdata->edid;
> -	int num;
> +	struct edid *edid;
> +	int num = 0;
>   
> -	if (!edid) {
> -		pm_runtime_get_sync(pdata->dev);
> -		edid = pdata->edid = drm_get_edid(connector, &pdata->aux.ddc);
> -		pm_runtime_put(pdata->dev);
> -	}
> +	pm_runtime_get_sync(pdata->dev);
> +	edid = drm_get_edid(connector, &pdata->aux.ddc);
> +	pm_runtime_put(pdata->dev);
>   
> -	if (edid && drm_edid_is_valid(edid)) {
> -		num = drm_add_edid_modes(connector, edid);
> +	if (edid) {
> +		if (drm_edid_is_valid(edid))
> +			num = drm_add_edid_modes(connector, edid);
> +		kfree(edid);
>   		if (num)
>   			return num;
>   	}
> @@ -1308,8 +1306,6 @@ static int ti_sn_bridge_remove(struct i2c_client *client)
>   	if (!pdata)
>   		return -EINVAL;
>   
> -	kfree(pdata->edid);
> -
>   	ti_sn_debugfs_remove(pdata);
>   
>   	drm_bridge_remove(&pdata->bridge);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ