Commit d174db07 authored by Andrey Smirnov's avatar Andrey Smirnov Committed by Andrzej Hajda

drm/bridge: tc358767: Drop unnecessary 8 byte buffer

tc_get_display_props() never reads more than a byte via AUX, so
there's no need to reserve 8 for that purpose. No function change
intended.
Signed-off-by: default avatarAndrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Cory Tusar <cory.tusar@zii.aero>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-14-andrew.smirnov@gmail.com
parent 72648926
...@@ -636,8 +636,7 @@ static int tc_aux_link_setup(struct tc_data *tc) ...@@ -636,8 +636,7 @@ static int tc_aux_link_setup(struct tc_data *tc)
static int tc_get_display_props(struct tc_data *tc) static int tc_get_display_props(struct tc_data *tc)
{ {
int ret; int ret;
/* temp buffer */ u8 reg;
u8 tmp[8];
/* Read DP Rx Link Capability */ /* Read DP Rx Link Capability */
ret = drm_dp_link_probe(&tc->aux, &tc->link.base); ret = drm_dp_link_probe(&tc->aux, &tc->link.base);
...@@ -653,21 +652,21 @@ static int tc_get_display_props(struct tc_data *tc) ...@@ -653,21 +652,21 @@ static int tc_get_display_props(struct tc_data *tc)
tc->link.base.num_lanes = 2; tc->link.base.num_lanes = 2;
} }
ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp); ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, &reg);
if (ret < 0) if (ret < 0)
goto err_dpcd_read; goto err_dpcd_read;
tc->link.spread = tmp[0] & DP_MAX_DOWNSPREAD_0_5; tc->link.spread = reg & DP_MAX_DOWNSPREAD_0_5;
ret = drm_dp_dpcd_readb(&tc->aux, DP_MAIN_LINK_CHANNEL_CODING, tmp); ret = drm_dp_dpcd_readb(&tc->aux, DP_MAIN_LINK_CHANNEL_CODING, &reg);
if (ret < 0) if (ret < 0)
goto err_dpcd_read; goto err_dpcd_read;
tc->link.scrambler_dis = false; tc->link.scrambler_dis = false;
/* read assr */ /* read assr */
ret = drm_dp_dpcd_readb(&tc->aux, DP_EDP_CONFIGURATION_SET, tmp); ret = drm_dp_dpcd_readb(&tc->aux, DP_EDP_CONFIGURATION_SET, &reg);
if (ret < 0) if (ret < 0)
goto err_dpcd_read; goto err_dpcd_read;
tc->link.assr = tmp[0] & DP_ALTERNATE_SCRAMBLER_RESET_ENABLE; tc->link.assr = reg & DP_ALTERNATE_SCRAMBLER_RESET_ENABLE;
dev_dbg(tc->dev, "DPCD rev: %d.%d, rate: %s, lanes: %d, framing: %s\n", dev_dbg(tc->dev, "DPCD rev: %d.%d, rate: %s, lanes: %d, framing: %s\n",
tc->link.base.revision >> 4, tc->link.base.revision & 0x0f, tc->link.base.revision >> 4, tc->link.base.revision & 0x0f,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment