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

firwmare: Add firmware_verbose to control firmware messages. #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions fthd_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
#include "fthd_v4l2.h"
#include "fthd_debugfs.h"

bool firmware_verbose = FIRMWARE_VERBOSE;

module_param(firmware_verbose, bool, 0644);
MODULE_PARM_DESC(firmware_verbose,
"Enable extremely verbose debugging messages from firmware to be emitted.");

static int fthd_pci_reserve_mem(struct fthd_private *dev_priv)
{
unsigned long start;
Expand Down Expand Up @@ -150,7 +156,8 @@ static void terminal_handler(struct fthd_private *dev_priv,
if (request_size > 512)
request_size = 512;
FTHD_S2_MEMCPY_FROMIO(buf, address, request_size);
pr_info("FWMSG: %.*s", request_size, buf);
if (firmware_verbose)
pr_info("FWMSG: %.*s", request_size, buf);
}

static void buf_t2h_handler(struct fthd_private *dev_priv,
Expand Down Expand Up @@ -546,7 +553,6 @@ static struct pci_driver fthd_pci_driver = {
.resume = fthd_pci_resume,
#endif
};

module_pci_driver(fthd_pci_driver);

MODULE_AUTHOR("Patrik Jakobsson <[email protected]>");
Expand Down
1 change: 1 addition & 0 deletions fthd_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define FTHD_PCI_ISP_IO 4

#define FTHD_BUFFERS 4
#define FIRMWARE_VERBOSE false

enum FW_CHAN_TYPE {
FW_CHAN_TYPE_OUT=0,
Expand Down