Skip to contentSkip to conversation

drm/amd/display: remove unused function setFieldWithMask

PATCH Applied YueHaibing 4 participants 4 messages Aug 27, 2019

Subsystems (3)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 2/3 drm/amd/display: remove unused function setFieldWithMask

After commit a9f54ce3c603 ("drm/amd/display: Refactoring VTEM"), there is no caller in tree.

---
 .../drm/amd/display/modules/info_packet/info_packet.c | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -19
index 5f4b98d..d885d64 100644
@@ -114,25 +114,6 @@ enum ColorimetryYCCDP {
 	ColorimetryYCC_DP_ITU2020YCbCr  = 7,
 };
 
-void setFieldWithMask(unsigned char *dest, unsigned int mask, unsigned int value)
-{
-	unsigned int shift = 0;
-
-	if (!mask || !dest)
-		return;
-
-	while (!((mask >> shift) & 1))
-		shift++;
-
-	//reset
-	*dest = *dest & ~mask;
-	//set
-	//dont let value span past mask
-	value = value & (mask >> shift);
-	//insert value
-	*dest = *dest | (value << shift);
-}
-
 void mod_build_vsc_infopacket(const struct dc_stream_state *stream,
 		struct dc_info_packet *info_packet)
 {
Signature · 1 line
2.7.4
Reviewed-by on v1 2/3
#1 lore raw
Quoted 4 lines · YueHaibing

After commit a9f54ce3c603 ("drm/amd/display: Refactoring VTEM"), there is no caller in tree.

Harry

Quoted 25 lines
---
 .../drm/amd/display/modules/info_packet/info_packet.c | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -12
index 5f4b98d..d885d64 100644
@@ -114,25 +114,6 @@ enum ColorimetryYCCDP {
 	ColorimetryYCC_DP_ITU2020YCbCr  = 7,
 };
 
-void setFieldWithMask(unsigned char *dest, unsigned int mask, unsigned int value)
-{
-	unsigned int shift = 0;
-
-	if (!mask || !dest)
-		return;
-
-	while (!((mask >> shift) & 1))
-		shift++;
-
-	//reset
-	*dest = *dest & ~mask;

drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c enum ColorimetryYCCDP { · line 119

Quoted 10 lines
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -7
-	//set
-	//dont let value span past mask
-	value = value & (mask >> shift);
-	//insert value
-	*dest = *dest | (value << shift);
-}
-
 void mod_build_vsc_infopacket(const struct dc_stream_state *stream,
 		struct dc_info_packet *info_packet)
 {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Applied
#2 lore raw
Quoted 9 lines · Harry Wentland
Quoted 4 lines · YueHaibing

After commit a9f54ce3c603 ("drm/amd/display: Refactoring VTEM"), there is no caller in tree.

Applied. Thanks!

Alex

Quoted 33 lines

Harry

Quoted 31 lines
---
 .../drm/amd/display/modules/info_packet/info_packet.c | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -19
index 5f4b98d..d885d64 100644
@@ -114,25 +114,6 @@ enum ColorimetryYCCDP {
      ColorimetryYCC_DP_ITU2020YCbCr  = 7,
 };
 
-void setFieldWithMask(unsigned char *dest, unsigned int mask, unsigned int value)
-{
-     unsigned int shift = 0;
-
-     if (!mask || !dest)
-             return;
-
-     while (!((mask >> shift) & 1))
-             shift++;
-
-     //reset
-     *dest = *dest & ~mask;
-     //set
-     //dont let value span past mask
-     value = value & (mask >> shift);
-     //insert value
-     *dest = *dest | (value << shift);
-}
-
Quoted 8 lines

drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c enum ColorimetryYCCDP { · line 119

Quoted 4 lines
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -0
 void mod_build_vsc_infopacket(const struct dc_stream_state *stream,
              struct dc_info_packet *info_packet)
 {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hi Alex,

There are callers in the same file "info_packet.c"

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: August 27, 2019 10:20
To: Wentland, Harry <[email protected]>
Cc: YueHaibing <[email protected]>; Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; [email protected]; [email protected]; Lakha, Bhawanpreet <[email protected]>; Koo, Anthony <[email protected]>; Othman, Ahmad <[email protected]>; Bernstein, Eric <[email protected]>; Cyr, Aric <[email protected]>; [email protected]; Tatla, Harmanprit <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 2/3] drm/amd/display: remove unused function setFieldWithMask

Quoted 10 lines · Harry Wentland
Quoted 5 lines · YueHaibing

After commit a9f54ce3c603 ("drm/amd/display: Refactoring VTEM"), there is no caller in tree.

YueHaibing <[email protected]>

Applied. Thanks!

Alex

Quoted 34 lines

Harry

Quoted 32 lines
---
 .../drm/amd/display/modules/info_packet/info_packet.c | 19 
-------------------
 1 file changed, 19 deletions(-)
(quoted diff) +0 -0

a/drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c b/drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c index 5f4b98d..d885d64 100644

drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -17
@@ -114,25 +114,6 @@ enum ColorimetryYCCDP {
      ColorimetryYCC_DP_ITU2020YCbCr  = 7,  };
 
-void setFieldWithMask(unsigned char *dest, unsigned int mask, 
 unsigned int value) -{
-     unsigned int shift = 0;
-
-     if (!mask || !dest)
-             return;
-
-     while (!((mask >> shift) & 1))
-             shift++;
-
-     //reset
-     *dest = *dest & ~mask;
-     //set
-     //dont let value span past mask
-     value = value & (mask >> shift);
-     //insert value
-     *dest = *dest | (value << shift);
-}
Quoted 8 lines

drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c enum ColorimetryYCCDP {

Quoted 4 lines
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -1
-
 void mod_build_vsc_infopacket(const struct dc_stream_state *stream,
              struct dc_info_packet *info_packet)  {
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx