Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
47c10a07
Commit
47c10a07
authored
1 year ago
by
q3k
Browse files
Options
Downloads
Patches
Plain Diff
st3m/gfx: notify of pipeline starvation
parent
bb804637
No related branches found
No related tags found
No related merge requests found
Pipeline
#5611
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/st3m/st3m_gfx.c
+19
-4
19 additions, 4 deletions
components/st3m/st3m_gfx.c
with
19 additions
and
4 deletions
components/st3m/st3m_gfx.c
+
19
−
4
View file @
47c10a07
...
...
@@ -57,6 +57,21 @@ static st3m_counter_timer_t rast_write_time;
static
TaskHandle_t
crtc_task
;
static
TaskHandle_t
rast_task
;
// Attempt to receive from a queue forever, but log an error if it takes longer
// than two seconds to get something.
static
void
xQueueReceiveNotifyStarved
(
QueueHandle_t
q
,
void
*
dst
,
const
char
*
desc
)
{
uint8_t
starved
=
0
;
for
(;;)
{
if
(
xQueueReceive
(
q
,
dst
,
pdMS_TO_TICKS
(
2000
))
==
pdTRUE
)
{
return
;
}
if
(
!
starved
)
{
ESP_LOGE
(
TAG
,
"%s"
,
desc
);
starved
=
1
;
}
}
}
static
void
st3m_gfx_crtc_task
(
void
*
_arg
)
{
(
void
)
_arg
;
...
...
@@ -64,7 +79,7 @@ static void st3m_gfx_crtc_task(void *_arg) {
int
descno
;
int64_t
start
=
esp_timer_get_time
();
xQueueReceive
(
framebuffer_blitq
,
&
descno
,
portMAX_DELAY
);
xQueueReceive
NotifyStarved
(
framebuffer_blitq
,
&
descno
,
"crtc task starved!"
);
int64_t
end
=
esp_timer_get_time
();
st3m_counter_timer_sample
(
&
blit_read_time
,
end
-
start
);
...
...
@@ -96,12 +111,12 @@ static void st3m_gfx_rast_task(void *_arg) {
while
(
true
)
{
int
fb_descno
,
dctx_descno
;
int64_t
start
=
esp_timer_get_time
();
xQueueReceive
(
framebuffer_freeq
,
&
fb_descno
,
portMAX_DELAY
);
xQueueReceive
NotifyStarved
(
framebuffer_freeq
,
&
fb_descno
,
"rast task starved (freeq)!"
);
int64_t
end
=
esp_timer_get_time
();
st3m_counter_timer_sample
(
&
rast_read_fb_time
,
end
-
start
);
start
=
esp_timer_get_time
();
xQueueReceive
(
dctx_rastq
,
&
dctx_descno
,
portMAX_DELAY
);
xQueueReceive
NotifyStarved
(
dctx_rastq
,
&
dctx_descno
,
"rast task starved (dctx)!"
);
end
=
esp_timer_get_time
();
st3m_counter_timer_sample
(
&
rast_read_dctx_time
,
end
-
start
);
...
...
@@ -256,4 +271,4 @@ void st3m_gfx_flush(void) {
assert
(
res
==
pdTRUE
);
}
ESP_LOGW
(
TAG
,
"Pipeline flush/reset done."
);
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment