From: "Rafał Miłecki" <zajec5@gmail.com>
To: Dave Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <deathsimple@vodafone.de>
Subject: [next][PATCH 1/5] drm/radeon/kms: move audio params to separated struct
Date: Sat, 28 Apr 2012 23:35:20 +0200 [thread overview]
Message-ID: <1335648924-3754-2-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1335648924-3754-1-git-send-email-zajec5@gmail.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/radeon/r600_audio.c | 34 +++++++++++++++++-----------------
drivers/gpu/drm/radeon/radeon.h | 19 ++++++++++---------
2 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c
index a7c06c3..b922a3c 100644
--- a/drivers/gpu/drm/radeon/r600_audio.c
+++ b/drivers/gpu/drm/radeon/r600_audio.c
@@ -120,18 +120,18 @@ void r600_audio_update_hdmi(struct work_struct *work)
struct drm_encoder *encoder;
int changes = 0;
- changes |= channels != rdev->audio_channels;
- changes |= rate != rdev->audio_rate;
- changes |= bps != rdev->audio_bits_per_sample;
- changes |= status_bits != rdev->audio_status_bits;
- changes |= category_code != rdev->audio_category_code;
+ changes |= channels != rdev->audio.channels;
+ changes |= rate != rdev->audio.rate;
+ changes |= bps != rdev->audio.bits_per_sample;
+ changes |= status_bits != rdev->audio.status_bits;
+ changes |= category_code != rdev->audio.category_code;
if (changes) {
- rdev->audio_channels = channels;
- rdev->audio_rate = rate;
- rdev->audio_bits_per_sample = bps;
- rdev->audio_status_bits = status_bits;
- rdev->audio_category_code = category_code;
+ rdev->audio.channels = channels;
+ rdev->audio.rate = rate;
+ rdev->audio.bits_per_sample = bps;
+ rdev->audio.status_bits = status_bits;
+ rdev->audio.category_code = category_code;
}
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
@@ -157,7 +157,7 @@ static void r600_audio_engine_enable(struct radeon_device *rdev, bool enable)
WREG32_P(R600_AUDIO_ENABLE,
enable ? 0x81000000 : 0x0, ~0x81000000);
}
- rdev->audio_enabled = enable;
+ rdev->audio.enabled = enable;
}
/*
@@ -170,11 +170,11 @@ int r600_audio_init(struct radeon_device *rdev)
r600_audio_engine_enable(rdev, true);
- rdev->audio_channels = -1;
- rdev->audio_rate = -1;
- rdev->audio_bits_per_sample = -1;
- rdev->audio_status_bits = 0;
- rdev->audio_category_code = 0;
+ rdev->audio.channels = -1;
+ rdev->audio.rate = -1;
+ rdev->audio.bits_per_sample = -1;
+ rdev->audio.status_bits = 0;
+ rdev->audio.category_code = 0;
return 0;
}
@@ -243,7 +243,7 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock)
*/
void r600_audio_fini(struct radeon_device *rdev)
{
- if (!rdev->audio_enabled)
+ if (!rdev->audio.enabled)
return;
r600_audio_engine_enable(rdev, false);
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 566ca3b..610acee 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1114,6 +1114,15 @@ int radeon_pm_get_type_index(struct radeon_device *rdev,
enum radeon_pm_state_type ps_type,
int instance);
+struct r600_audio {
+ bool enabled;
+ int channels;
+ int rate;
+ int bits_per_sample;
+ u8 status_bits;
+ u8 category_code;
+};
+
/*
* Benchmarking
*/
@@ -1559,15 +1568,7 @@ struct radeon_device {
int num_crtc; /* number of crtcs */
struct mutex dc_hw_i2c_mutex; /* display controller hw i2c mutex */
struct mutex vram_mutex;
-
- /* audio stuff */
- bool audio_enabled;
- int audio_channels;
- int audio_rate;
- int audio_bits_per_sample;
- uint8_t audio_status_bits;
- uint8_t audio_category_code;
-
+ struct r600_audio audio; /* audio stuff */
struct notifier_block acpi_nb;
/* only one userspace can use Hyperz features or CMASK at a time */
struct drm_file *hyperz_filp;
--
1.7.7
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-04-28 21:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 21:35 [next][PATCH 0/5] radeon HDMI cleaning Rafał Miłecki
2012-04-28 21:35 ` Rafał Miłecki [this message]
2012-04-28 21:35 ` [next][PATCH 2/5] drm/radeon/kms: get rid of hdmi_config_offset Rafał Miłecki
2012-04-28 21:35 ` [next][PATCH 3/5] drm/radeon/kms: get rid of r600_hdmi_find_free_block Rafał Miłecki
2012-04-28 21:35 ` [next][PATCH 4/5] drm/radeon/kms: keep HDMI state in separated variable Rafał Miłecki
2012-04-28 21:35 ` [next][PATCH 5/5] drm/radeon/kms/hdmi: use relative offsets, official regs Rafał Miłecki
2012-04-29 12:26 ` [next][PATCH 0/5] radeon HDMI cleaning Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335648924-3754-2-git-send-email-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox