You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/08 11:29:43 UTC
[GitHub] [incubator-nuttx] adamkaliszan opened a new pull request, #6588: SSD1680 Landscape mode bugfix
adamkaliszan opened a new pull request, #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588
Displays with resolution that is not multiplication of 8 has some issues in landscape mode
## Summary
Fixed LANDSCAPE mode.
Some performance improvement in landscape mode.
## Impact
None
## Testing
On 2.13 inch display with STM nucleo WL55
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] onegray commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
onegray commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r916821925
##########
drivers/lcd/ssd1680.c:
##########
@@ -1011,21 +1021,35 @@ static void ssd1680_snd_cmd_with_data_bitstrip(
{
for (j = 0; j < 8; j++)
{
+# if defined(CONFIG_LCD_LANDSCAPE)
+ if (offset == 0)
+ {
+ bytes[j] = *(dta + j * strip_len);
+ }
+ else
+ {
+ bytes[j] = (*(dta + j * strip_len)) >> offset;
+
+ bytes[j] |= ((*(dta + j * strip_len - 1)) << (8 - offset)
+ & (0xff << (8 - offset)));
+ }
+# else
bytes[j] = *(dta + j * strip_len);
+# endif
}
for (i = 0; i < 8; i++)
{
val = 0;
for (j = 0; j < 8; j++)
{
-#if defined(CONFIG_LCD_LANDSCAPE)
+# if defined(CONFIG_LCD_LANDSCAPE)
val |= ((bytes[j] << (7 - j)) & (1 << (7 - j)));
bytes[j] = bytes[j] >> 1;
-#elif
+# elif
Review Comment:
```suggestion
# else
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] onegray commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
onegray commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r916824291
##########
drivers/lcd/ssd1680.c:
##########
@@ -1087,13 +1108,13 @@ static void ssd1680_snd_cmd_with_data_even_bits_bitstrip(
val = 0;
for (j = 0; j < 8; j++)
{
-#if defined(CONFIG_LCD_LANDSCAPE)
+# if defined(CONFIG_LCD_LANDSCAPE)
val |= ((rows[j] << (7 - j)) & (1 << (7 - j)));
rows[j] = rows[j] >> 1;
-#elif
+# elif
Review Comment:
```suggestion
# else
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] adamkaliszan commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
adamkaliszan commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r917225088
##########
drivers/lcd/ssd1680.c:
##########
@@ -1011,21 +1021,35 @@ static void ssd1680_snd_cmd_with_data_bitstrip(
{
for (j = 0; j < 8; j++)
{
+# if defined(CONFIG_LCD_LANDSCAPE)
+ if (offset == 0)
+ {
+ bytes[j] = *(dta + j * strip_len);
+ }
+ else
+ {
+ bytes[j] = (*(dta + j * strip_len)) >> offset;
+
+ bytes[j] |= ((*(dta + j * strip_len - 1)) << (8 - offset)
+ & (0xff << (8 - offset)));
+ }
+# else
bytes[j] = *(dta + j * strip_len);
+# endif
}
for (i = 0; i < 8; i++)
{
val = 0;
for (j = 0; j < 8; j++)
{
-#if defined(CONFIG_LCD_LANDSCAPE)
+# if defined(CONFIG_LCD_LANDSCAPE)
val |= ((bytes[j] << (7 - j)) & (1 << (7 - j)));
bytes[j] = bytes[j] >> 1;
-#elif
+# elif
Review Comment:
Shame on me. This bug was in many places. In first implementation it was considered PORTRAIT RPORTRAIT, LANDSCAPE and RLANDSCAPE.... That's why instead of else there was elif. It was forgotten to change elif into else after removing condition. Thanks a lot.
I checked whole file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] adamkaliszan commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
adamkaliszan commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r916973204
##########
drivers/lcd/ssd1680.c:
##########
@@ -735,7 +733,17 @@ static int ssd1680_configuredisplay(struct ssd1680_dev_s *priv)
static int ssd1680_update_all_and_redraw(struct ssd1680_dev_s *priv)
{
int row;
- for (row = 0; row < SSD1680_DEV_FB_YRES; row++)
+#if defined(CONFIG_LCD_PORTRAIT) || defined(CONFIG_LCD_RPORTRAIT)
+ const int row_incr = 1;
+#else
+# if SSD1680_DEV_BPP == 1
+ const int row_incr = 8;
+# elif
Review Comment:
Thx. What a stupid mistake....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] onegray commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
onegray commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r916819001
##########
drivers/lcd/ssd1680.c:
##########
@@ -735,7 +733,17 @@ static int ssd1680_configuredisplay(struct ssd1680_dev_s *priv)
static int ssd1680_update_all_and_redraw(struct ssd1680_dev_s *priv)
{
int row;
- for (row = 0; row < SSD1680_DEV_FB_YRES; row++)
+#if defined(CONFIG_LCD_PORTRAIT) || defined(CONFIG_LCD_RPORTRAIT)
+ const int row_incr = 1;
+#else
+# if SSD1680_DEV_BPP == 1
+ const int row_incr = 8;
+# elif
Review Comment:
```suggestion
# else
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] onegray commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
onegray commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r916824566
##########
drivers/lcd/ssd1680.c:
##########
@@ -1104,11 +1125,11 @@ static void ssd1680_snd_cmd_with_data_even_bits_bitstrip(
}
}
-#if defined(CONFIG_LCD_LANDSCAPE)
+# if defined(CONFIG_LCD_LANDSCAPE)
dta--;
-#elif
+# elif
Review Comment:
```suggestion
# else
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] onegray commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
onegray commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r916822588
##########
drivers/lcd/ssd1680.c:
##########
@@ -1036,29 +1060,26 @@ static void ssd1680_snd_cmd_with_data_bitstrip(
}
}
-#if defined(CONFIG_LCD_LANDSCAPE)
+# if defined(CONFIG_LCD_LANDSCAPE)
dta--;
-#elif
+# elif
Review Comment:
```suggestion
# else
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] onegray commented on a diff in pull request #6588: SSD1680 Landscape mode bugfix
Posted by GitBox <gi...@apache.org>.
onegray commented on code in PR #6588:
URL: https://github.com/apache/incubator-nuttx/pull/6588#discussion_r917146001
##########
drivers/lcd/ssd1680.c:
##########
@@ -1011,21 +1021,35 @@ static void ssd1680_snd_cmd_with_data_bitstrip(
{
for (j = 0; j < 8; j++)
{
+# if defined(CONFIG_LCD_LANDSCAPE)
+ if (offset == 0)
+ {
+ bytes[j] = *(dta + j * strip_len);
+ }
+ else
+ {
+ bytes[j] = (*(dta + j * strip_len)) >> offset;
+
+ bytes[j] |= ((*(dta + j * strip_len - 1)) << (8 - offset)
+ & (0xff << (8 - offset)));
+ }
+# else
bytes[j] = *(dta + j * strip_len);
+# endif
}
for (i = 0; i < 8; i++)
{
val = 0;
for (j = 0; j < 8; j++)
{
-#if defined(CONFIG_LCD_LANDSCAPE)
+# if defined(CONFIG_LCD_LANDSCAPE)
val |= ((bytes[j] << (7 - j)) & (1 << (7 - j)));
bytes[j] = bytes[j] >> 1;
-#elif
+# elif
Review Comment:
Note, still not fixed here and in a few places below.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org