Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 0 additions & 4 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -2891,10 +2891,6 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
else
fault_errors &= GEN8_DE_PIPE_IRQ_FAULT_ERRORS;

if (fault_errors)
DRM_ERROR("Fault errors on pipe %c: 0x%08x\n",
pipe_name(pipe),
fault_errors);
}

if (HAS_PCH_SPLIT(dev_priv) && !HAS_PCH_NOP(dev_priv) &&
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/intel_csr.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ static void csr_load_work_fn(struct work_struct *work)
dev_priv = container_of(work, typeof(*dev_priv), csr.work);
csr = &dev_priv->csr;

request_firmware(&fw, dev_priv->csr.fw_path, &dev_priv->drm.pdev->dev);
if (fw)
dev_priv->csr.dmc_payload = parse_csr_fw(dev_priv, fw);

Expand Down
63 changes: 62 additions & 1 deletion drivers/staging/android/fwdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct android_fwdata_state {
struct kobject *vendor_kobj;
struct kobject *product_kobj;
struct kobject *odm_kobj;
struct kobject *config_kobj;
};

static struct android_fwdata_state state;
Expand Down Expand Up @@ -61,7 +62,9 @@ static ssize_t property_show(struct kobject *kobj, struct kobj_attribute *attr,
prefix = "android.fstab.product";
} else if (kobj == state.odm_kobj) {
prefix = "android.fstab.odm";
} else {
} else if (kobj == state.config_kobj) {
prefix = "android.fstab.config";
} else {
pr_err("%s: Unexpected folder\n", __func__);
return -EINVAL;
}
Expand Down Expand Up @@ -95,6 +98,7 @@ static DT_SIMPLE_ATTR(system, compatible);
static DT_SIMPLE_ATTR(vendor, compatible);
static DT_SIMPLE_ATTR(product, compatible);
static DT_SIMPLE_ATTR(odm, compatible);
static DT_SIMPLE_ATTR(config, compatible);

static DT_SIMPLE_ATTR(vbmeta, parts);

Expand Down Expand Up @@ -128,6 +132,11 @@ static DT_SIMPLE_ATTR(odm, type);
static DT_SIMPLE_ATTR(odm, mnt_flags);
static DT_SIMPLE_ATTR(odm, fsmgr_flags);

static DT_SIMPLE_ATTR(config, dev);
static DT_SIMPLE_ATTR(config, type);
static DT_SIMPLE_ATTR(config, mnt_flags);
static DT_SIMPLE_ATTR(config, fsmgr_flags);

static struct attribute *system_attrs[] = {
&system_compatible_attr.attr,
&system_dev_attr.attr,
Expand All @@ -154,6 +163,19 @@ static struct attribute_group vendor_group = {
.attrs = vendor_attrs,
};

static struct attribute *config_attrs[] = {
&config_compatible_attr.attr,
&config_dev_attr.attr,
&config_type_attr.attr,
&config_mnt_flags_attr.attr,
&config_fsmgr_flags_attr.attr,
NULL,
};

static struct attribute_group config_group = {
.attrs = config_attrs,
};

static struct attribute *product_attrs[] = {
&product_compatible_attr.attr,
&product_dev_attr.attr,
Expand Down Expand Up @@ -258,6 +280,11 @@ static void remove_folder_with_files(struct kobject *kobj,

static void clean_up(void)
{
if (state.config_kobj) {
/* Delete <sysfs_device>/properties/android/fstab/vendor/ */
remove_folder_with_files(state.config_kobj, &config_group);
state.config_kobj = NULL;
}
if (state.vendor_kobj) {
/* Delete <sysfs_device>/properties/android/fstab/vendor/ */
remove_folder_with_files(state.vendor_kobj, &vendor_group);
Expand Down Expand Up @@ -302,6 +329,32 @@ static void clean_up(void)
}
}

static struct kobject *create_folder_and_sub_with_files(struct kobject *parent,
const char *name,
const char *folder,
struct attribute_group *group)
{
struct kobject *kobj;

kobj = create_folder(parent, name);
if (kobj) {
/* Note: Usually drivers should use device_add_groups() rather
* than sysfs_create_group(), but the former does not support
* creating the folder in a subfolder.
*/
int ret;

ret = sysfs_create_group(kobj, group);
if (ret) {
pr_err("%s: Failed to create %s/*: ret=%d\n", __func__,
name, ret);
kobject_put(kobj);
return NULL;
}
}
return kobj;
}

static int android_fwdata_probe(struct platform_device *pdev)
{
int ret = -EIO;
Expand Down Expand Up @@ -370,6 +423,14 @@ static int android_fwdata_probe(struct platform_device *pdev)
if (!state.odm_kobj)
goto out;
}
if (device_property_present(state.dev, "android.fstab.config.dev")) {
/* Firmware contains fstab config for early mount of /vendor/oem_config */
state.config_kobj = create_folder_with_files(state.fstab_kobj,
"vendor/oem_config",
&config_group);
if (!state.config_kobj)
goto out;
}
return 0;

out:
Expand Down