Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate a FRAMEBUFFERS_BASE for hdmi_inX #375

Merged
merged 6 commits into from Dec 30, 2017

Conversation

stefanor
Copy link
Contributor

We accidentally started using the same framebuffers for all inputs in 92eb6f9

@@ -12,7 +12,7 @@
#include "uptime.h"
#include "version_data.h"

#define PATTERN_FRAMEBUFFER_BASE 0x02000000 + 0x100000
#define PATTERN_FRAMEBUFFER_BASE 0x00000000 + 0x100000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern is now the first framebuffer? Can you add a comment about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what sort of comment you want. The commit message making this change describes it.
What is special enough about the first frame buffer that warrants a comment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe,

/* We store all the frame buffers at offset 0x0000000, the layout can be seen below;
 *
 *  0xX00000 - Pattern Frame Buffer
 * Each input then has 3 frame buffers spaced like this;
 *  0xX00000 - HDMI Input 0 - Frame Buffer n
 *  0xX00000 - HDMI Input 0 - Frame Buffer n+1
 *  0xX00000 - HDMI Input 0 - Frame Buffer n+2

@mithro
Copy link
Member

mithro commented Nov 27, 2017

Does this have a bug associated with it?

@@ -19,8 +19,6 @@
int hdmi_in0_debug;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the firmware/hdmi_in0.c file be generated via the Makefile in some way now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why?

@@ -22,6 +22,11 @@ FIRMWARE_DIR=$SCRIPT_DIR

X=$1

# parse the hex as an integer, for arithemtic purposes, then convert back to hex
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just better to do a #define HDMI_IN_INDEX and then calculate the frame buffer value from that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that may be simpler. It'd probably have to be HDMI_IN0_INDEX etc.

@@ -12,7 +12,7 @@
#include "uptime.h"
#include "version_data.h"

#define PATTERN_FRAMEBUFFER_BASE 0x02000000 + 0x100000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good if the 0x100000 part was a define somewhere. It's the rough size of the frame buffer right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who knows. I haven't seen a memory map.

Presumably the framebuffers are stored above this base, so I don't know what goes between 0x02000000 and the base.

@stefanor
Copy link
Contributor Author

stefanor commented Nov 29, 2017

Does this have a bug associated with it?

Yes, but not reported in a ticket. Fixing it was easy enough that I didn't bother.

@mithro mithro merged commit 1d5a391 into timvideos:master Dec 30, 2017
@stefanor stefanor deleted the hdmi-input-base branch December 30, 2017 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants